Tag Info

Hot answers tagged

13

This isn't something that QML supports, the typical answer is to write a C++ plugin to handle that kind of thing. However, the SDK team is planning out various extensions to provide to QML app developers, and this may be something that they implement in a generic plugin that you can use.


8

Well, Qt is owned by Digia, not related to Ubuntu/Canonical. Qt itself is licensed under the GNU Lesser General Public License (LGPL) version 2.1. This allows you to create and redistribute your closed source apps very well, as long as you're dynamically linking to Qt, or adhere to the limitations of statically linking. See also these Q&A on SO: Use ...


7

These instructions were tested on Ubuntu 12.04, Ubuntu 12.10 both 32-bit and 64-bit. First off we need to install some dependencies. Install these even if you already have Qt5 installed: sudo apt-get install build-essential libgtk2.0-dev libgl1-mesa-dev If you haven't already, download and install the QtSDK from http://qt-project.org/downloads. For ...


7

There will be; we're working on it. I plan to have the QML U1DB declarative API published soon. In the meantime, until that arrives, you may find this code interesting; it is a simple notes app, but written with QML and using U1DB. This U1DB QML addition follows the declarative QML U1DB API I mentioned above, but it's a Python-based prototype of that API. ...


6

If you are on Ubuntu 12.04 I had the same problem and followed the instructions here: http://dragly.org/2013/01/03/getting-started-with-ubuntu-for-phones-on-12-04/comment-page-1/#comment-5821 The issue is they only have packages for Quantal and not Precise so this fix works as well while still getting updates. Replace precise with your version of ...


6

Update: For 14.04 see the much simplified answer by int_ua. Original Text: At http://talk.maemo.org/showthread.php?t=87580 there is a basic overview of how to add the extension to QML. I decided to give it a shot using the ubuntu-sdk instead, which is slightly different. I'll document below. For this project I selected Ubuntu Touch/Simple UI with C++ ...


6

gu is short for grid unit. From the user interface manual: Measurement Units A new measurement unit is defined called the grid unit, abbreviated gu. 1 grid unit translates to a given number of pixels depending on the type of screen that the user interface is displayed on. For example, on a laptop computer 1 grid unit will typically translate to 8 ...


5

With the release of Qt Creator 2.8 things are changing. It now natively supports Python for code editing and there are few Python-based features. From Qt Creator 2.8 release announcement: An editor specific for Python was added, with highlighting and indentation, and a Python class wizard


5

There is already a bug assigned. See here: https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1158246 The ui toolkit is still under heavy development, the bug is confirmed and assigned to the tutorials author David Planella.


5

No. You can also use Java, Python, C, Javascript, QML, Vala, and C#, and probably other launguages too. Source of image


4

This is not an answer to your question since the dialog text is not directly changed, but it might be an answer to your problem, since the dialog text changes itself dynamically :-) Assuming that you have some item that triggeres the onSomethingHappened, you could connect properties of the dialog to properties of the item. Example: Item { Component { ...


4

Changing aspects of the layout depending on the size of the window can be accomplished in a number of ways. At the most basic level, you can just set properties to different values based on the dimensions. Here is a minimal example that draws a grey square that turns orange if you make the window bigger: Run with qmlscene path/to/file.qml import QtQuick ...


4

The SDK was pretty fluid, since this was the initial development and we only reached our first "stable" state with the release of Ubuntu 13.10. There should not be any breakage in the API from here on out without first going to a deprecation period. If this is a concern to enough people, we can run a session at the upcoming UDS to discuss how to handle it. ...


4

Qt Quick Controls are available since Qt 5.1 and the Qt 5 version in Ubuntu repositories seems to be Qt 5.0.2. Consequently you cannot use Qt Quick Controls with the current version of Qt5 in Ubuntu repositories. If you want to use them, you have got 3 options: Using official Qt Project packages for Linux. You can download them here. Waiting a version of ...


4

You can us the SQLite offline storage API directly from Qml using Javascript: import QtQuick.LocalStorage 2.0 If you want in-depth examples, I'd suggest looking at the source of some of the Ubuntu Touch Core-Apps. I know that at least the weather, clock, and RSS reader apps all use this. For now though, here's a simple example: import QtQuick.LocalStorage ...


4

I found the solution myself and I want to explain what I did wrong. I forgot in: main.c #include <QQmlEngine> #include <QQmlComponent> #include "stringhelper.h" to qmlRegisterType<StringHelper>("MyStringHelper", 1, 0, "StringHelper"); stringhelper.h: ...class... .....public slots:... Q_INVOKABLE ...


4

We've now reviewed the content on the App developers site so that it is clearly stated that the focus and the recommended way to write Ubuntu apps is the Ubuntu SDK. While Quickly will still be available in the archives, and you will still be able to write Python + GTK applications with it, the only supported and recommended technology to develop ...


4

Generally speaking there is no way to use gettext translation in QT because the library uses an internal translation mechanism (Qtranslate and .ts files) as stated here QTBUG-2404. However, there is a viable alternative. Shipping with QT there is a toolkit called lconvert that can be used to convert .ts files to .po and vice versa. So you can extract all ...


4

I'm afraid that adding tabs dynamically it is currently not possible The SDK team tell me that this is a limitation of the VisualItemModel type (which the the Tabs component uses), as it does not allow adding children dynamically. There is an open bug to keep track of this issue.


4

In default 12.10 it seems to be provided by libqtwebkit4. But that package is from Qt4, so I suppose you are using qt5-edgers ppa to provide Qt5. There you have two packages that can solve your problem: sudo apt-get install libqt5webkit5-qmlwebkitplugin libqt5webkit5 So if you are using that PPA install those two packages and see if it solves your ...


4

Yes, Qt-Creator is a C++ IDE, with little support for other languages but since version 2.8.0 a quite basic python support has been added. That said you can use Qt-Designer (the form building tool), Qt-Translator (the translate tool), etc... easily with python. There are two Qt-Python bindings right now, the GPL/Commercial dual licensed PyQt, and the LGPL ...


4

Unfortunately the documentation does not explain how applications should be themed, especially that this part is not fully implemented. However applications can still load theme files where they alter the system defined styles and specify their own ones. There is no specific rule where to put the application-specific theme file yet. However, it should be ...


4

I ran your qml snippet in this qml file on Ubuntu 13.10: import QtQuick 2.0 import Ubuntu.Components 0.1 MainView { id: main width: units.gu(30) height: units.gu(35) Page { Text { anchors.fill: parent anchors.margins: units.gu(2) horizontalAlignment: Text.AlignJustify text: "aaaaaa ...


4

You could try QtWebKit.experimental. If you add import QtWebKit.experimental 1.0 to your QML files, your WebView objects will have access to experimental attributes: import QtQuick 2.0 import QtWebKit.experimental 1.0 import Ubuntu.Components 0.1 MainView { id: main width: units.gu(100) height: units.gu(75) Page { id: mypage ...


3

index is a property of the ListView delegate, not necessarily a ListItem. It represents the number of the currentItem. From the docs: The index is exposed as an accessible index property. Properties of the model are also available depending upon the type of Data Model.


3

Setting the icon in your .desktop file is adding it to your application configuration, so I'm not quite sure what you're asking. As long as the icon is installed with everything else, you should be all set. If you're installing via a click package, a relative file name for the icon in the .desktop file is all you need; otherwise, you may want to use an ...


3

The i18n portion is the component name, and the tr() function is the function to translate a string, in the Ubuntu SDK, with QML. This method of translation support uses gettext, and not the built-in localization features of Qt/QML, which are not compatible with gettext.


3

Here's a quick example of how to play an mp3 file using MediaPlayer component from QtMultimedia and the Ubuntu UI toolkit: import QtQuick 2.0 import Ubuntu.Components 0.1 import QtMultimedia 5.0 MainView { width: units.gu(100) height: units.gu(75) Page { title: i18n.tr("Simple Player") MediaPlayer { id: player ...


3

Headers and toolbars are part of the MainView, so you would have to implement that yourself if you don't use MainView. Also the MainView has an "ActionManager" which is needed for actions from the app to become available to the HUD. Other properties that we need (for example for application switching) such as an AppID may also be added to the MainView. So ...


3

You could create an account plugin for Trello, so that a Trello account could be created from the "Online Account" panel in the System Settings. The you could use the Ubuntu.OnlineAccounts QML module to login, like this: import QtQuick 2.0 import Ubuntu.OnlineAccounts 0.1 Rectangle { width: 400 height: 300 AccountServiceModel { id: ...



Only top voted, non community-wiki answers of a minimum length are eligible