All questions related to the QML programming language. QML (Qt Markup Language) is a declarative, JavaScript-like language to create intuitive and responsive user interfaces for applications that can run in multiple devices, platforms and form factors. Learn more about it ...

learn more… | top users | synonyms

2
votes
1answer
21 views

What is the difference between Ubuntu.Components and QtQuick?

QtQuick 2.0 Ubuntu.Components 0.1 Are two common imports when developing applications for Ubuntu. Are these classes? Can you import member functions this way? If yes, how can tell what member ...
3
votes
1answer
18 views

QML: What is the difference between a Component, Element, Property, Attribute, and Object?

The reason why I ask, is that often languages define the same terms differently, and QML is fairly unique in some regards. A brief explanation or analogy is preferred, where as more extensive and ...
0
votes
1answer
22 views

QML: QChar Booleans are undefined

function myFunction(x) { console.log(x.isLetter) } myFunction("s") When I run this in a .qml file, it tells me that "isLetter" is undefined. Why? ...
0
votes
2answers
18 views

QML: How do you toggle boolean?

In QML, how do you toggle boolean non explicitly? For example: Whenever a button is pressed, a boolean property will simply switch to its other value. If false, it will be come true. If true, it ...
0
votes
0answers
10 views

ActionSelectionPopover - populate dynamically

I am trying to populate dynamically an ActionSelectionPopover... Does any one ever got it working? this is the static way to get it work: ActionSelectionPopover { id: popMeUp data: bitrates ...
1
vote
1answer
12 views

QML: How to display a “<” character in a richTextBox?

The code in question: description.insert(0,"<tr><td><H1> ---Less-Than-Sign-Here--- </H1></td><td><font face='Ubuntu'size='3'color='#f37420'> ...
3
votes
1answer
17 views

QML: Will the Ubuntu Phone be theme-able, and do I need to develop with that in mind?

Take a simple example in formatting richtext: The Manual Way someTextBox.insert(0,"<font face='Ubuntu Mono'size='3'color='#f37420'> Blah Blah Blah </font>") The hypothetical Way ...
2
votes
1answer
18 views

QML: What is the difference between Row and TemplateRow?

TemplateRow is just an example out of several. There is also TemplateSection and I assume TemplateColumn as well as many others. When should I be using Row{} vs TemplateRow{}?
0
votes
2answers
38 views

QML: What does i18n.tr(“blah blah blah”) mean?

Specifically, what is i18n.tr short for?
0
votes
0answers
25 views

Imports for executing system commands? [duplicate]

QML at the moment lacks the ability to execute basic system commands. What libraries or functions can be imported to add this functionality to a .qml file?
0
votes
1answer
51 views

In QML, is there a Conditional Layout that corresponds to the phones orientation?

So instead of guessing it with something like this: ConditionalLayout { name: "column" when: layouts.width > units.gu(50) Column {... It would be something like this: ...
1
vote
1answer
7 views

Allow OptionSelector to Scroll While Expanded

My QML app uses an OptionSelector to allow users to choose from a list of items. On tablet size, I have it set to keep it expanded. However, I limit the container height, and while it's expanded, it ...
1
vote
1answer
49 views

It is not supported to create click packages for a non UbuntuSDK target

I've just finished a first version of my app port to QML and tried to create a click package but Ubuntu SDK said Wrong kit type It is not supported to create click packages for a non UbuntuSDK ...
1
vote
2answers
30 views

How to set default time for QML DatePicker?

According to the API I should use date property, but with mode: "Hours|Minutes" the picker stays at 00:00. Is it possible somehow?
1
vote
1answer
24 views

Scrolling of ListView within a Column in QML

Below code is working fine ( thanks to Sylvain ), only when scroling, the top row from the ListView overwrite the buttonRow. Any idea ? – import QtQuick 2.0 import Ubuntu.Components 0.1 MainView { ...
2
votes
2answers
27 views

How to get pixel length of a Button text string in QML?

I need to know Button text length in pixels. How to do that ?
4
votes
1answer
79 views

What does .gu stand for?

What does .gu stand for? For example: ConditionalLayout { name: "row" when: layouts.width > units.gu(50) //right here Row { anchors.fill: parent etc....
2
votes
1answer
85 views
+50

QML: Simplest way to write to a text file?

QML at the moment lacks basic system commands, so I am looking for the most simple template to write to /tmp/text.txt. Here is a starter: import QtQuick 2.0 import Ubuntu.Components 0.1 import ...
2
votes
1answer
27 views

Ubuntu Touch how to detect If the application is closed

on ubuntu touch. I run an application in terminal and close the application in the Application scope. The application isn't killed. And no event is caught in QQuickView. How do I detect this close ...
1
vote
0answers
18 views

Publish a QML/C++ application as a click package

I've written an application which I would like to publish as click package. All the guides and prepared projects mention plain QML applications only. My application furthermore depends on a shared ...
1
vote
1answer
34 views

QML PageStack , communication between Pages - return values

I defined PageStack only on master page (a.qml) : import QtQuick 2.0 import Ubuntu.Components 0.1 MainView { width: units.gu(48) height: units.gu(60) PageStack { id: pageStack ...
1
vote
0answers
20 views

Cannot import directory path to qmlscene

I am trying to import directory in QML as explained, here: http://qt-project.org/doc/qt-5.0/qtqml/qtqml-syntax-directoryimports.html. I have the following ubuntu-app | - extras1 | - extras2 | - ...
0
votes
0answers
17 views

Import libraries in Ubuntu SDK

I am very new to QML, Qt and the like. I want to add a library (e.g. http://sourceforge.net/p/qzxing/wiki/Home/) for a "Ubuntu -> Simple UI" project. However, I cannot figure out how. The instructions ...
1
vote
1answer
41 views

Internationalization of QML application using i18n

Does someone know all the steps needed to have the apps translated in multiple languages? I am using in my QML files i18n.tr() , and such words I need to translate I performed below steps ( ...
2
votes
1answer
36 views

QML ListView is not scrollable ( if included within a row )

Below code is using ListView within a Column and Row. But the ListView is not scrolable. Any idea why ? import QtQuick 2.0 import Ubuntu.Components 0.1 MainView { width: units.gu(60) height: ...
1
vote
1answer
24 views

QML ListView overwriten with buttons - but should be in different rows

In below code I have 2 rows . In first I have buttons and in second a ListView. Why are they overwriten in the display, what's wrong ? import QtQuick 2.0 import Ubuntu.Components 0.1 Page { id: ...
2
votes
1answer
44 views

QML ListView display only 1 row ( if covered in Column and row )

I need to put a ListView ( coded in QML) into a Row, but in this case only first Row of the ListView is displayed . Some idea why ? Here is my example : import QtQuick 2.0 import Ubuntu.Components ...
2
votes
1answer
37 views

How to recieve call to custom URL handler in Ubuntu Touch QML

I have a QML application that needs to react to a custom URL handler call, like "myapp://something". I know I need to register the URL handler in my *.desktop file as: ...
3
votes
1answer
30 views

What's a good way to mock a remote HTTPS API for unit testing my QML app?

I'm tinkering with a QML app that interacts with a remote REST API over HTTPS. The "client" part of the app is neatly packaged into a component and I'd like to unit test that, but I don't want to ...
1
vote
1answer
33 views

How to open a browser when the TextEdit::onLinkActivated signal is received

I'd like to open a browser window to display the URL received by a TextEdit onLinkActivated signal. Is it possible to perform such call from the QML application?
1
vote
1answer
78 views

Ubuntu SDK open file dialog

I've started playing with the SDK to start developing an application. The application will be something that will allow me to filter records in an CSV file by a search term. But does a file dialog ...
4
votes
1answer
46 views

How do I make a WebView transparent?

Consider the following QML snippet: Page { WebView { id: webView anchors.fill: parent } } I then attempt to load some HTML in the WebView using the following JavaScript: ...
3
votes
1answer
49 views

How come the contents of Text elements aren't being properly justified?

Consider the following page in a QML application: Page { Text { anchors.fill: parent anchors.margins: units.gu(2) horizontalAlignment: Text.AlignJustify text: ...
1
vote
1answer
82 views

Getting ReferenceError when accessing public C++ slot from QML

According to Qt5 documentation: exposing methods including qt slots all public slots of C++ classes that inherit from QObject, are accessible from QML Here what I did: C++ class MyClass : public ...
3
votes
1answer
57 views

Install newly developed app on Ubuntu Touch device

Host OS: Ubuntu 12.04.4 LTS Ubuntu Touch Device: Nexus4 Running Ubuntu 13.10 My dev environment is QtCreator with the ubuntu-sdk plugin I'm trying to deploy the QML / C++ sample app (the one ...
2
votes
1answer
34 views

In the CurrencyConverter Ubuntu SDK QML example where does the index variable come from?

In Ubuntu SDK QML tutorial a simple currency converter is build. The complete QML source code can be found here. When working through the example I found the following snippet somewhat confusing, ...
3
votes
2answers
48 views

How to change the color of *just* the header?

Is there a non-hacky way to change the color of just the header in an app using the Ubuntu SDK? MainView has a headerColor property, but that is used as the first step of gradient. Currently, I'm just ...
1
vote
0answers
36 views

Develop apps for Ubuntu touch: Learning by doing [duplicate]

I really want to develop apps for Ubuntu touch. I have set up the Ubunut sdk and i am currently reading tutorials about qml but one will not learn programming by reading books or tutorials so i am ...
3
votes
1answer
63 views

Appmenu with QML App

I'm developing an Ubuntu SDK meant to be used on both the desktop and touch interfaces. Obviously the menu that slides up from the bottom of the window is not a great interface for the desktop. ...
1
vote
1answer
44 views

Set Application Icon

I'm building a QML application with the Ubuntu SDK. I've figured out how to add an application icon to the .desktop file, but I'm not sure where to add the window icon itself. I've seen code for ...
0
votes
1answer
189 views

Get Qt WebKit HTML Content in QML

My application is built with QML (Ubuntu SDK), and I need to get the HTML content from a page loaded with a Qt WebView after the page is loaded. Based on some initial research, it would appear that ...
4
votes
1answer
31 views

What does functional_qml_applicationName_matches_manifest mean?

I submitted an application to the click store but it comes back with this error:- functional_qml_applicationName_matches_manifest What does this mean and how do I fix it?
2
votes
1answer
79 views

How do I add a qrc file to my Ubuntu Touch qml project?

My UT QML project makes use of a set of images, and I was planning use them via "qrc:///pathtoimages/myimage.png" style of url. In Ubuntu SDK, I can "add new... Qt / Qt Resource File". The file is ...
0
votes
2answers
68 views

What's Ubuntu's app development IDE?

What's Ubuntu's official IDE used to develop applications? Which language is preferred for Ubuntu apps?
1
vote
1answer
59 views

U1DB problems with apparmor

I'm having problem with u1db and apparmor. The application works fine, but when it is packaged apparmor does not allow the app to save data into $HOME/.local/share/.. so I can't actually save my ...
1
vote
0answers
40 views

Is signal handling in QtQuick asynchronous? [closed]

I have the following QML document: Item { id: item MouseArea { onClicked: { /* emit signal */ item.someSignal(); } } ... } When I click the item, ...
1
vote
1answer
175 views

Qt QML modules, how to import them and know what to import & QtMultimediaKit 1.0

In the last question, (How to insert Video element in my Ubuntu application?) I thought that I could create the Video element with the QtMultimediaKit1 . But I tried to import QtMultimediaKit 1.0 and ...
4
votes
1answer
126 views

How to insert Video element in my Ubuntu application?

I saw on some sites that you can insert videos with the Video element by importing Qt 4.7 and QtMultimediaKit 1.1 . But I have an error by compiling the project (it's a tabbed touch UI project): ...
0
votes
0answers
31 views

QML Ubuntu SDK : How to insert Video element [duplicate]

Hello everybody! I am learning Qml and using the Ubuntu SDK tool in addition to QML elements. I saw on some sites that you can insert videos with the Video element by importing Qt 4.7 and ...
2
votes
0answers
125 views

Puzzle Game QML GridView Animation Problems

I've been working on a puzzle game for Ubuntu Touch and I'm facing some issues with animations. The problem seems to occurs when GridView animations (add, move, remove...) play too fast. Something ...