Tagged Questions

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
1answer
16 views

How to add some padding between a ListView and its footer?

Consider the following QML snippet: ListView { //... footer: Text { text: "Sample Text" } } This will display the text "Sample Text" directly at the bottom of the ListView. ...
1
vote
0answers
19 views

Ubuntu QML Alarm not working properly

I've been trying to create a simple app capable of setting system alarm. But although I can see the set alarm at correct time in the event list under my clock indicator (on desktop), it doesn't notify ...
1
vote
0answers
11 views

Ubuntu SDK: How can I use PyQt for developing Ubuntu Touch apps?

I've heard that it's possible, can you give me some pointers on how to do that?
0
votes
0answers
14 views

Ubuntu Touch: How can I debug ubuntu touch apps on the device?

My app works well on desktop but I can't figure out why does it crash on my nexus 7. How can I debug it while it runs on the device?
1
vote
1answer
27 views

Ubuntu Touch: How do I run an ubuntu touch app from the terminal?

How do I run an ubuntu touch app from the terminal? Where are they stored?
0
votes
0answers
12 views

Ubuntu SDK, Ubuntu Touch: Disable automaticOrientation for one element?

I am building an Ubuntu Touch app. Option "automaticOrientation: true" rotates the whole interface, but I need one element to stay in place and ignore it. Is this possible?
1
vote
1answer
14 views

Ubuntu SDK, Ubuntu touch app: “Error: Error opening shm.”

I am building an app for Ubuntu Touch. It works well on desktop, but when I try to open it on nexus it starts opening a splash screen but immediately crashes. Here's the logs: t_shm() at ...
2
votes
2answers
24 views

Ubuntu SDK: How can I see error logs for my ubuntu touch app?

I've built an ubuntu touch app, it works well on desktop, but when I install it on the device and try to launch, it crashes. Where can I find error logs or any other output that the app can give me to ...
1
vote
0answers
11 views

Ubuntu SDK, QML: how do I create a vertical slider?

I am trying to create a vertical slider: http://developer.ubuntu.com/api/qml/current/Ubuntu.Components.Slider/ How can I do that? Just rotating it doesn't seem like a good idea, it messes up anchors ...
2
votes
1answer
28 views

Ubuntu SDK, how do I create a tree view in QML?

I have json data that defines comments that have children. I am trying to display nested comments(like in hackernews or reddit) in my app. What is the best way to go about doing it?
0
votes
0answers
22 views

Ubuntu SDK - how to use the new header? [duplicate]

I want to use the new header features that are described here, but I can not find any documentation. Where can I find a QML example of using it?
0
votes
1answer
18 views

Combine a falling animation with a going up animation on click

I am trying to make a moving sprite fall down from the upper left corner to the left down corner. That function is working properly with the SequentialAnimation component. Apart from that, when you ...
6
votes
1answer
63 views

What's the difference between OptionSelector and ItemSelector?

When writing an app for Ubuntu, it seems I can interchangeably use the ItemSelector or OptionSelector components. In which situation should I use each one of those? What's their main difference that ...
2
votes
1answer
54 views

How to get data from REST API with QML (for ubuntu touch app)?

I am trying to use firebase REST API and to get some data into my ubuntu touch app. Can you give me some pointers on how could I go about doing that?
0
votes
1answer
28 views

Ubuntu Components - Picker problem

While trying to create two pickers on Ubuntu inside a dialog, the labels inside can only be read properly when they are not chosen and overlap on the left when chosen, as seen in the image: The ...
0
votes
0answers
29 views

Ubuntu Touch Qt3D 2.0 crashes on start

I've been trying to develop something in QML3D and while my app is running well on desktop, I can't get it working on my tablet (even thought for example Qt3D cylinder from the software center - ...
2
votes
0answers
44 views

How can I detect screen rotation with QML

I've been trying to create a Ubuntu QML application, but when I rotate my screen while it is running on my tablet, the header is semitransparent and the content below is exceeding the screen's height ...
5
votes
1answer
74 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 ...
2
votes
1answer
26 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
23 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
15 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
41 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
84 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
21 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
30 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
59 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?
3
votes
1answer
420 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
80 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
9 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
41 views

Can you do dictionaries in qml?

So for example: Item { id: sylvainLikesAnsweringMyQuestions property var myDict: {[key,value],[anotherKey,anotherValue]} }
3
votes
1answer
104 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
36 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
69 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); ...
4
votes
1answer
59 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
34 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
70 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
89 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
20 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 ...
13
votes
0answers
260 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
53 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
109 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
47 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
46 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
35 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 ...
3
votes
1answer
37 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
141 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 ...