Questions related to the development of QML applications on the Ubuntu environment. QML is a core programming language for Ubuntu & Ubuntu Touch.

learn more… | top users | synonyms

2
votes
0answers
16 views

How do I get my QML program to utilize Unity7 notifications? Is there an API I can use?

I am developing a screenshot application in QML, and I wish to utilize Unity 7 notifications, similar to what Rhythmbox uses when notifying a user that a new song has started, or when the volume is ...
0
votes
1answer
11 views

Add external library to Ubuntu App in Ubuntu SDK

I am trying to add the QuaZip library to my project (https://launchpad.net/vadetux). I have tried setting the EXEC variable in the CMakeLists.txt to: set(EXEC "qmlscene -I /usr/include/quazip $@ ...
2
votes
0answers
16 views

Is there a Bool or Flag you can use in QML to determine whether a phone is running the application?

For example: Text { text: isPhone ? "this application is running on a phone" : "this application is not running on a phone" }
0
votes
0answers
9 views

Error while trying to import pictures with ContentHub

I followed the Content Hub tutorial and I used the code about importing single pictures I found here: http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Content.index/ Anyway, when trying to import ...
1
vote
2answers
21 views

What is the objectName: property in QML, why is it needed, and how is it different than the id: property?

What is the objectName: property in QML? Which components have this property? Why is it needed? How is it different than the id: property? Why can't I just use the id: property instead?
1
vote
1answer
68 views

Using Online Accounts to authenticate against my server

In my Ubuntu QML app I'm trying to use online accounts in order to authenticate against my server. I'm a little confused as to how I should go about doing this. Ultimately I want the user to be able ...
0
votes
1answer
18 views

How to change the font style of a ListItem?

In my Ubuntu Touch application, I have a list of items and I would like to highlight some of them by making the text appear in bold (think of unread messages in a mail client). Looking at the ...
2
votes
1answer
21 views

How do open a link with a button

I would like to click a button in my QML app and have it open a link in the browser on the device.
1
vote
1answer
28 views

How do you determine the combined width of the components in a Row {}?

How do you determine the combined width of the components in a Row {}? The width of the row itself will not work, as I need to set its spacing:, and using this property will create a loop error. It ...
1
vote
1answer
41 views

How do you round numbers in qml to two decimal places?

I have these ridiculously long real numbers such as 33.088117576394794, and I am trying to convert them to doubles (Two decimal places). So in this case, I want 33.09. How do you do this in QML?
1
vote
1answer
64 views

How to create charts in QML?

I'd like to add to my application a page with not only raw figures but also eye friendly charts to display data. Is there a native component or a third-party plugin I could use to create such ...
3
votes
2answers
48 views

QML - How to create QML Components properties so they can be set from JavaScript?

I am trying to create a component with certain properties I've set. The sounds location and name are given by a C++ function that is actually working because the console.log() shows so: qml: Adding ...
0
votes
0answers
7 views

Page Stack Component Depth to always remain visible?

Is this possible? Say you have a depth of 5 tabs, They appear and disappear as you click the header. I want them to always remain visible.
1
vote
1answer
20 views

Can you do dictionaries in qml?

So for example: Item { id: sylvainLikesAnsweringMyQuestions property var myDict: {[key,value],[anotherKey,anotherValue]} }
2
votes
1answer
46 views

How do you check if a property is undefined in qml?

How do you check if a property is undefined in qml? This is what I am trying to do: Button { id: myButton text: if (text === "undefined"){"default text"} }
2
votes
1answer
35 views

How to make sure a Row {} or Column {} does not contract when an item's visible: property is set to false?

This is a question about good coding practice with QML: How can I make sure that a Row {} or Column {} does not contract when one of its Item's visible: property is set to false? The current work ...
1
vote
1answer
48 views

How do you use Q_INVOKABLE to access c++ functions in QML?

I am looking for the most simple and straightforward example. For my part; .h public: KTerminalDisplay(QQuickItem *parent = 0); ~KTerminalDisplay(); Q_INVOKABLE void setFontStyle(QString & s); ...
2
votes
1answer
39 views

What does the head: property do on Page{} in qml?

I have an app that I am trying to get the toolbar in the header to work. In the documentation I've noticed a property called head that seems to create and add items to the header toolbar. What is the ...
1
vote
1answer
34 views

(QML) What does the “?” do in defining properties?

Popey { working: visible ? 100 } What does that "?" indicate in this example?
2
votes
0answers
30 views

How do I delete files that my app owns from QML?

My app imports files from ContentHub and saves them into ~/.local/share/applications/${myappid}/Pictures/ and I would like to be able to delete them when the user no longer wants them.
0
votes
0answers
27 views

Anybody know how to delete a file from QML without resorting to a C++ plugin?

Anybody know how to delete a file from QML without resorting to a C++ plugin? It should be possible to do in the folder that my app uses for data storage.
1
vote
1answer
67 views

Should we be upgrading away from ubuntu.components 0.1?

Should we be upgrading away from ubuntu.components 0.1 in our ubuntu applications? I am working on one of the core apps, and many were unsure as to whether the current library (1.1 I think) offers ...
1
vote
0answers
16 views

In the Ubuntu SDK, is there a way to view all global variables in current project?

In the Ubuntu SDK, is there a way to view all global variables in current project? Working on one of the core apps, and I want to figure out if any global variables have been defined for the current ...
3
votes
1answer
73 views

How to detect if GPS sources are enabled using QtPositioning in Ubuntu Touch?

I am using PositionSource to get the latitude and longitude of the user's location from the GPS data provided by Ubuntu Touch. However I need to detect if GPS has been enabled by the user. On reading ...
0
votes
0answers
18 views

(QML) Which components do I want to invoke for notifcations and dialogues on Ubuntu Touch?

Now of course I can make any sort of notification or dialogue I want. However, I want to know what the Ubuntu Style guide recommends for notifications and dialogues. A notifcation could be: Song ...
9
votes
0answers
169 views

How to lock ubuntu device orientation in portrait or landscape from user input?

I am working on a reader app to be used on Ubuntu-Touch. When reading books from the app it would be a helpful feature to lock the orientation in either portrait or landscape. This would be useful ...
0
votes
0answers
46 views

Why I can't open qml file?

I try to develop a very simple application in QML for ubuntu-touch ! On desktop, when I press the button "add debpt" it's open a form : When I lunch it into a emulator, I have nothing : This is ...
2
votes
0answers
99 views

How does one run QML tests on a Ubuntu Touch Phone?

My application has QML tests using QtTests that I run locally on the desktop via qmltestrunner. I am interested in running these tests on the device to simulate real conditions like the on-screen ...
2
votes
1answer
42 views

How do you equally space out elements in a Row?

Row{ width: parent.width spacing: ???? Checkbox{} Checkbox{} Checkbox{} Checkbox{} } So just to be clear, the checkboxes should be spaced in such a manner that however wide ...
1
vote
1answer
38 views

How to you get a flickable to do a smooth scroll?

Flickable{ Button{ onClicked: parent.????????? } Or do I have to create a function for this?
2
votes
1answer
33 views

Why does the Ubuntu SDK tell me, “do not use comma expression”, and what should I use instead?

So for example: onCurrentlyExpandedChanged: flickable.DragOverBounds, flickable.contentHeight += itemHeight,console.log(itemHeight) The commas will have a yellow underline, and the tooltip will ...
2
votes
1answer
31 views

How do you prevent the 2nd page in a PageStack from running?

I may be missing something here but I'm not sure why the code is running before page 2 should be loaded. http://pastebin.ubuntu.com/8068379/ And is there any way to prevent the functions and code ...
1
vote
1answer
112 views

Why am I getting the error “Cannot assign to non-existent property ”head"?

I'm actually on Trusty, and I want to try new "head" property which comes with API 14.10 of Ubuntu SDK. When I launch qmlscene to test my applicaton, I get this error : Cannot assign to ...
3
votes
0answers
34 views

Unable to build QtQuick 2 projects

I'm running Xubuntu 14.04, and I have the following packages installed: qt5-default (5.2.1) qtcreator (3.0.1-0ubuntu4) qml (5.2.1-3ubuntu15.1) They were installed from the official repos and are ...
3
votes
0answers
79 views

(QML) Flickable not working as supposed

So, while building an Ubuntu app I needed to use Flickable for scrolling, so now I have code of the form Page{ ... Flickable { anchors.fill: parent content.height: element1.height + ...
1
vote
1answer
53 views

Prevent components from becoming transparent on a qml window

Here is the code for a transparent and frameless window in qml: import QtQuick 2.2 import QtQuick.Window 2.1 import Ubuntu.Components 0.1 Window { MouseArea { anchors.fill: parent ...
2
votes
1answer
39 views

Get a rid of the header section in a qml app on Ubuntu SDK

It is possible to remove the header section in the MainView of an new qml app? Code: import QtQuick 2.0 import Ubuntu.Components 0.1 import "components" /*! \brief MainView with a Label and ...
2
votes
1answer
93 views

Ubuntu SDK: Provide your application identifier in $APP_ID environment variable

I'm getting familiar with Ubuntu SDK and QML. After creating sample project: 'App with Simple UI', I'm able to run it correctly. But, I'm getting warning: ...
3
votes
0answers
116 views

How to create an Ubuntu Touch app with a C++ backend and a QML interface [closed]

I'm looking forward to the release of Ubuntu Touch and thought it would be nice to contribute a small and free app that I'm also using now on my Android phone. The free and open source app for ...
1
vote
1answer
62 views

How can I store the value an user enters in a variable?

How can I store the value an user enters in a variable? For example I have this code TextField {width: 37; height: 19 var id: q1 ...
1
vote
1answer
64 views

QML what to use to store int numbers TextInput or TextField

What is good to use on a Ubuntu Phone app that needs 25 variables to get input that are int numbers. Text fields or text input. Right now I'm using text inputs to create the 25 ids that I'm going to ...
1
vote
1answer
96 views

Execute Javascript Code in Oxide

I'm Looking for an oxide equivalence to this QtWebKit Function: WebView.experimental.evaluateJavaScript() Or WebKitGtk WebView.execute_script() I'm having problems to find documentation about ...
2
votes
0answers
40 views

Use Pictures for an Image object in QML for Ubuntu Touch

I'm trying to use an image file from the main Pictures directory (/home/phablet/Pictures) for an AnimatedIMage/Image object however it says error reading file. I've tried two paths already but neither ...
2
votes
1answer
39 views

QML can't insert text into TextInput

I have an TextInput box and I can't insert text into it, I have tried everything I knew but still I could not put text into it, or even delete a text I have put on it. Here is some of the code I ...
2
votes
1answer
70 views

How can I create in QML a table of TextInput boxes with background

How can I make a table with 6 rows 5 tables and 25 TextInput boxes, with background. I've tried almost everything to put an background to the TextInput boxes, but still I could not get it right. My ...
2
votes
1answer
86 views

how to resolve “TypeError: Cannot call method 'push' of null”

I'm a new qml programmer and I found my self in this problem that when I want to call a new page when clicked on a button it says: TypeError: Cannot call method 'push' of null I've tried everything ...
2
votes
1answer
41 views

how to change to next page when clicked on button

hi guys I'm new in qml programming and i was just wondering how can i switch to an other page when the user clicks on my button. by the way how can i make a new page in the ubuntu sdk so that when ...
1
vote
1answer
115 views

Problem with QtWebkit and QML in PyQt5 App Ubuntu for Devices (Ubuntu Touch)

I'm having problems with qtwebkit in ubuntu for devices (Nexus 10) when using pyqt5, the webview element doesn't show, and the application closes. But if I test the same .qml file with qmlscene it ...
1
vote
2answers
166 views

read from text file in qml qt/quick

I have a program to preview images that store every image's path (all images are in my computer) in text file. first i open text file and read line by line images paths and store to a list then i ...
0
votes
1answer
99 views

Read lines from a text file in QML Qt/Quick

I need open a text file and read it's contents line by line and store each lines in a string list in qt quick 2.2. Can every one help me?