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

0
votes
1answer
13 views

U1Db QML API database on Application update

I have made an application in QML that uses U1Db qml Api (sdk 15.04.5). The Application create a database to save his data. The application is already loaded on Ubuntu store and available to the users....
-1
votes
0answers
18 views

i18n.tr(variableAsString) does not change .pot file

I have the following construct: Label { text: i18n.tr(databaseDao.label) } databaseDao.label is a variable, that is read by a c++ part from the database. The problem is, i run the app, the ....
6
votes
3answers
5k views

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.
0
votes
0answers
19 views

Create Python objects in QML using pyotherside

I am trying to build a Python backend for my Ubuntu Touch App using Pyotherside. Unfortunately, it is not very intuitive to me. What I want to do is to have a .py file where I define a Python class ...
0
votes
0answers
14 views

SVG Image as background for Ubuntu Shape in QML Application

I am trying to use an SVG image as the source of an UbuntuShape Object: UbuntuShape { id: mainPageMap height: parent.height ...
0
votes
1answer
69 views

ListView model reload with U1db.Query

I have a ListView with his model coming from a U1db.Query The reading and saving operation form U1db works, but i need to update the ListView model when a new item is inserted in the database, to ...
3
votes
1answer
186 views

Unable to access i18n in QML app's JS file

I'm having trouble importing the i18n library included in Ubuntu.Components 0.1 for use in a JS file. I initially ran into my question/problem while hacking on the 'Clock' Ubuntu Touch core app, but ...
0
votes
1answer
79 views

qtserialport in c++ app ubuntu

Can someone please tell me how to install the qtserialport to use in a c++ project in ubuntu? Thanks.
1
vote
1answer
10 views

Non-existent property tools in Page

I have a code which used to work but after I upgraded to (K)ubuntu 16.04 and the latest Ubuntu-sdk, it doesn't work anymore. I get error Cannot assign to non-existent property "tools". This is my code ...
0
votes
1answer
99 views

Running QML/C++ application build with CMake is unable to run from QtCreator or snap package

I am trying to get a QML/C++ application packaged as a snap. I am using CMake as a build system. The application builds fine and I am able to run the executable by double clicking on it. When trying ...
0
votes
0answers
32 views

How to work with QVariant(QJsonDocument) in javascript

I try to write a ubuntu app. My problem is, that i want to fill the ListModel in my qml. ListModel { id: model } i do that by using javascript: fill(database.get()) The database is defined ...
1
vote
0answers
26 views

content hub: make my app available to others

My app uses the phone's microphone to record audio. I need to make it available to other apps so that they can call upon it whenever they want to. Say email or a messaging service like telegram ...
0
votes
0answers
15 views

TextField using Keys.onPressed on Meizu MX4

I have this QML file: import QtQuick 2.2 import Ubuntu.Components 1.1 MainView { Label { id: lbl; text: "none"; } TextField { anchors.top: lbl.bottom; ...
2
votes
1answer
133 views

Ubuntu SDK : Having difficulty getting images to work in 'QML only app' when deploying to armhf device

When I deploy my QML only program to the desktop using the Ubuntu SDK, images that I have placed in the same folder as 'Main.qml' can be accessed and displayed correctly in the application using ...
16
votes
1answer
491 views

How to change index in OptionSelector immediately (without animation)?

In my app, I use an OptionSelector to choose from a list of bike stations. I also have a map component with placemarkers for each station. When I tap a placemarker, it also changes the OptionSelector ...
2
votes
1answer
71 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 ...
2
votes
1answer
3k 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?
2
votes
1answer
73 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
46 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 ...
2
votes
2answers
3k 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?
5
votes
3answers
7k 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"} }
1
vote
1answer
170 views

Ubuntu SDK Error 'could not find or load the Qt platform plugin “xcb”.'

I am trying to write my first ubuntu app using the Ubuntu SDK but keep running into an error. This error turns up both with QML and HTML5 apps. I am trying this just on the template for both project ...
1
vote
1answer
530 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 ...
1
vote
1answer
61 views

No video shown in Ubuntu Touch QML app video player

I'm trying to play a video in an Ubuntu Touch QML app. The audio plays, but no video is shown. A minimalistic version: import QtQuick 2.4 import Ubuntu.Components 1.2 import QtMultimedia 5.5 ...
3
votes
1answer
170 views

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

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

Is qml from the terminal supposed to work on OTA-10.2

Context: Meizu PRO 5 w/ UbuntuTouch OTA-10.2 (unboxed today). Developer Mode, and a rw filesystem. Question, qml and qmlscene segfault, and have broken symlinks: phablet@ubuntu-phablet:~$ qmlscene ...
0
votes
1answer
79 views

Plasma 5.5.5 NetworkManagement Widget won't load the QML file

Hello I am using Kubuntu 16.04 using Plasma 5.5.5 and Qt version 5.5.1. I was running kernel 5.5.3 and upon upgrade to 5.5.4 the plasma widget for network management seemed to break. So I downgraded ...
0
votes
0answers
67 views

Qt Creator missing Ubuntu Download Manager - how to install?

I am trying to use the Ubuntu Download Manager (https://developer.ubuntu.com/api/apps/qml/sdk-15.04.1/Ubuntu.DownloadManager.DownloadManager/) in Qt Creator by entering the line: import Ubuntu....
0
votes
1answer
51 views

QML MediaPlayer on Ubuntu Touch

Has anyone tried to play movie link (MP4) using QML MediaPlayer on Ubuntu Touch? Currently I can only get audio but without any video. Any help would be appreciated.
0
votes
1answer
63 views

I need Ubuntu.Components 1.3 for Ubuntu 14.04

Newbie here. Been an IAR baremetal embedded guy for years. Ubuntu transition is painful. I've installed Ubuntu 14.04. I've installed SDK and Qt Creator and I'm trying to build...anything. ...
1
vote
0answers
28 views

Go app won't compile in Ubuntu SDK

I'm trying to create a new Ubuntu Touch App with Go and QML using the template in the SDK. The application won't build and gives the following error. 17:41:47: Running command go get -d -u gopkg.in/...
3
votes
2answers
354 views

How do I simply run an ubuntu touch app from the terminal?

I've got a qml file and I just want to ssh to the phone and do qmlscene myfile.qml Is it possible without doing all that stuff with SDK and packages? Just vim and some simple commands that can fit ...
0
votes
1answer
366 views

QT Creator cannot start ubuntu apps on ubuntu 16.04

If i create a new project with QT Creator (Ubuntu 16.04) QML App with C++ plugin (cmake) Framework: ubuntu-sdk-15.04.4-qml Desktop Unix-Generator (Desktop) ( CMake works without problems ) I start ...
1
vote
0answers
56 views

How to use PageHeader on Ubuntu Desktop

I am trying to create an application for my Ubuntu Phone, that should be run on my desktop machine (15.10), too. It runs fine on my Ubuntu Phone (OTA 10), but when I try to run it on my desktop ...
0
votes
0answers
18 views

How to show a certain div in webview (qml)?

Is it possible to show a certain div from a webpage in qml webview for Ubuntu Touch?
2
votes
1answer
84 views

Get the sum of all values in a specific column of a ListView in QML [closed]

How have the sum of a column in a list view? By example the total cost : ListModel { id: fruitModel ListElement { ...
1
vote
0answers
80 views

QML unit testing: running qmltestrunner

I'm on ubuntu 14.04. I installed the Ubuntu SDK IDE. Running a QML App on my Ubuntu phone via the IDE works fine. I'm following this tutorial on testing https://developer.ubuntu.com/en/apps/qml/...
0
votes
1answer
33 views

How to download and parse a gzipped xml file with qml in Ubuntu Touch?

Currency converter tutorial is very useful in explaining how to download and parse an xml file through XmlListModel, but it seems it is not possible to parse a gizipped file in this way. How could I ...
0
votes
0answers
58 views

Segfault running PyQt5 on Ubuntu Phone

I'm struggling with running a very simple pyqt5 application on the Ubuntu Phone, loading a QML file. I have installed extra python-qt5 packages for this. This is basically as stripped down as I can ...
0
votes
1answer
51 views

Why does XMLHttpRequest used in ubuntu sdk QML application produce “Object path cannot be empty” error

When I deploy my application to my Ubuntu phone via ubuntu SDK I get the following error: QNetworkManagerInterface::QNetworkManagerInterface(QObject*) nmReply "An AppArmor policy prevents this sender ...
0
votes
0answers
56 views

Ubuntu-touch QML MediaPlayer metaData

I'm not experienced at all. I have this simple code, it works fine on PC, but when I run it on ubuntu-touch it doesn't display metadata but a series of "undefined" (one for each playMusic.metaData*). ...
1
vote
0answers
53 views

How to control system volume with C++/QML?

Helo, I want to develop an app. It should control the system volume by day time. I have two questions: How to change system volume in C++/QML? How can I run my app as a service that will ...
0
votes
1answer
27 views

Ubuntu SDK IDE quits with Segmentation fault when running example code

I installed Ubuntu SDK from ppa:ubuntu-sdk-team/ppa on Ubuntu 14.04 LTS 64bit. Then I created device kit ubuntu-sdk-15.04 armhf. When I try to run with CTRL + R example below from: https://developer....
5
votes
1answer
2k 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
0answers
20 views

ubuntu touch screen-shot api corodva/html/qml

I want to capture screen via ubuntu touch app. Is there any api like camera or other apis which can help capture screen because usually we take screen shot by holding volume up button. It can be any ...
1
vote
1answer
122 views

How to create and build snappy apps ?

I am very new to Ubuntu application development. I have to develop an application for snappy Ubuntu. Now I am confused about how to do it? So here are my few questions. Which language should I use ...
1
vote
0answers
127 views

QtBluetooth support for Ubuntu Touch

I like to build a qml-based app with bluetooth support. My code works well for the Desktop Kit in the Ubuntu SDK but fails on the BQ Aquaris 4.5 with the error message 'module "QtBluetooth" is not ...
0
votes
1answer
34 views

Issues with CurrencyConverter qml tutorial

I'm trying to follow the tutorial at https://developer.ubuntu.com/en/apps/qml/tutorials/building-your-first-qml-app/ which states, "Select the Projects > Ubuntu > App with Simple UI template and click ...
1
vote
1answer
84 views

ListModel display and if it contains [closed]

I want to know how to display a list if it contains a character. Example: ListModel { id: fruitModel ListElement { name: "Apple" cost: 2.45 } ListElement { ...
0
votes
0answers
29 views

Ubuntu SDK: QTquick not installed?

Der all, I just installed the Ubuntu SDK on Trusty Tahr (64bit). The MyHtml5 example worked quite well, but now I tried a "Simple QML App Projekt". My framework choice was ubuntu-sdk-14.04-qml ...