Hot answers tagged

5 votes

Error with Qtcreator when running project "error: Unknown module(s) in QT: qml quickwidgets svg quick"

Found the solution, install qtdeclarative5-dev package: sudo apt-get install qtdeclarative5-dev What's the development package for Qt5 in 14.04
Chohan's user avatar
  • 91
4 votes

How to add element for QML ListModel using Javascript?

Use subAlpha.append(). This method takes a Javascript object as an argument, which it uses to create a new ListElement with those keys and values. A working example: import QtQuick 2.0 ListView { ...
Robert Schroll's user avatar
3 votes
Accepted

QtLocation and QtPositioning not installed

As you are talking about developing, in other words about programming, then you need to install development packages with headers: qtlocation5-dev for /usr/include/x86_64-linux-gnu/qt5/QtLocation/...
N0rbert's user avatar
  • 97.4k
3 votes
Accepted

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

i think something like this will help you. function sum(){ var result = 0; for(var i = 0; i < fruitModel.count; i++){ result += fruitModel.get(i).cost; } return result; }
johangm90's user avatar
  • 151
3 votes

How to handle QML application shutdown?

Ubuntu components include the StateSaver capability. This allows QML properties to be saved at program exit and restored at restart. For each element with properties you wish to save, set the ...
Robert Schroll's user avatar
2 votes

How to create charts in QML?

Another solution is to use our binding which is quite similar to what Sylvain suggested. It works with Chart.js 2... it is not perfect but might be helpful for you, too: https://github.com/Elypson/...
IceFire's user avatar
  • 121
2 votes

Pure Qt application (QML/QtQuick) on Ubuntu Phone?

It will depend on what you're using. If your app uses any Android-specific APIs for things like notifications or background services, then you'll need to replace those with something that works on ...
mhall119's user avatar
  • 5,017
2 votes

Does Canonical have plans to build UI Toolkit APIs for the D programming language

Why would Canonical? Ubuntu is a community driven operating system and unless Canonical is going to focus on creating apps in D themself QML, HTML5 and C++ will do. I hear some community members ...
Rinzwind's user avatar
  • 295k
2 votes

kde clock format: how to include the day in a non-tiny font?

Plasma 5.4.0 has changed the plasmoid to a horizontal format. This prevents the day from being tiny. However, it still doesn't allow full customisation of the format, so if you want the day displayed, ...
Sparhawk's user avatar
  • 6,892
2 votes
Accepted

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

This is what I did to embed an image in the "binary": I'm using a qmake project with the default folder structure in Ubuntu SDK. I made a directory to store my images: project_name/backend/your_click/...
koukouviou's user avatar
2 votes
Accepted

How to create a cross-platform Ubuntu Touch app without qmlscene?

Apps that are on Ubuntu phone are open-source. Most of them don't use qmlscene. Terminal, for example: http://bazaar.launchpad.net/~ubuntu-terminal-dev/ubuntu-terminal-app/trunk/files You can clone ...
Velkan's user avatar
  • 3,516
2 votes
Accepted

Installing Qt 5.x on Ubuntu globally

That will probably cover it: sudo apt-get install qtdeclarative5-dev qml-module-qtquick-controls
Velkan's user avatar
  • 3,516
2 votes
Accepted

KDE Widget not loading- Netspeed widget

Do re-install this package: sudo apt-get install plasma-widgets-addons
PrakashS's user avatar
  • 126
1 vote
Accepted

Creating simple login form using Qt creator without any QtQuickControls

I found the answer for the above question: Following is the code: import QtQuick 1.0 Rectangle{ id:screen color: "lightgray" width: 3000; height:2700 Column { id: column1 ...
Sayli Jawale's user avatar
1 vote

Is QtAudioEngine available for Ubuntu 16.04?

https://bugreports.qt.io/browse/QTBUG-51567 So, I'd say that QtMultimedia packages for Debian/Ubuntu were built without that support. Quote: I got it to work by building QtMultimedia with CONFIG+=...
Velkan's user avatar
  • 3,516
1 vote
Accepted

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

Looks like your missing libqt5gui5 from your stage-packages UPDATE: So to expand my answer a bit more. Here is an simple working example to snap a CMake/Qt/QML application and make it runnable from ...
Daniel Chapman's user avatar
1 vote
Accepted

Plasma 5.5.5 NetworkManagement Widget won't load the QML file

Just downgrade to previous version of libkf5networkmanagerqt6 sudo apt-get --reinstall install libkf5networkmanagerqt6=5.18.0-0ubuntu1
rumatoest's user avatar
  • 126
1 vote

How do I develop a Ubuntu application using the Go language?

You most certainly can: Here's a template with a short tutorial: https://github.com/nikwen/ubuntu-go-qml-template Or if you want to create scopes, check out: https://developer.ubuntu.com/en/phone/...
NeoTheThird's user avatar
1 vote

using ubuntu-sdk to create app with problems

My solution was to change the plugins.qmltypes file: This bug is caused by setting exportMetaObjectRevisions to [0,0] on Component blocks that only have one export defined. Deleting the comma and the ...
delijati's user avatar
  • 111
1 vote
Accepted

Add image files in Ubuntu QML app with C++ plugins (qrc)

This is what worked for me. My resources.qrc is in {PROJECT_DIR}/resources: <RCC> <qresource prefix="/180"> <file alias="five">180/five_180.png</file> ... ...
moritz-weber's user avatar
1 vote

How to display a QWidget in Ubuntu Touch using QML and C++?

Oh, it's actually from the the Qt Widgets. Qt Widgets can't be easily pasted into QML user interface. There were some similar questions on StackOverflow: qt5-embed-qwidget-object-in-qml
Velkan's user avatar
  • 3,516
1 vote
Accepted

ubuntu phone textfield displayed different

Background of a text field is invisible if this text field is readOnly. For me they are invisible both on the phone and desktop (15.04). Theme styling file /usr/lib/x86_64-linux-gnu/qt5/qml/Ubuntu/...
Velkan's user avatar
  • 3,516
1 vote

SDK QML slider on release signal

QML properties come with signals that fire when that property changes. A property foo has the corresponding signal onFooChanged. This suggests two ways you could notice when the slider is released: ...
Robert Schroll's user avatar
1 vote
Accepted

How to keep an UbuntuListView between its boundaries?

Add clip: true to the UbuntuListView. By default, QML objects have this set to false, which allows them to draw outside their allocated rectangle. I assume this is an optimization, since it allows ...
Robert Schroll's user avatar
1 vote

How to install the qmlscene module version need?

Multiple Qt versions can be installed. Download a binary installer from the Qt site. Then use qmlscene from the needed version. Latest Qt 5.x version should work with that QtQuick version.
Velkan's user avatar
  • 3,516
1 vote

How to delete from an UbuntuListView?

By the way, I also need to remove the corresponding model item, but how do I do that? Apparently this was the solution: I just deleted from the model, and the view updated itself. I added an ID to ...
Cos64's user avatar
  • 889
1 vote

QtQuick Controls for armfh kit Ubuntu SDK (Ubuntu 15.04)

Don't use QtQuick Controls, or ship the QtQuick Controls you need as part of your application. Ubuntu provides its own set of QML widgets under the Ubuntu.Components namespace, instead of using those ...
Robert Schroll's user avatar
1 vote

Access document files from QML

You can't, at least under rules for distribution through the app store. As noted in the question you link to, the default application confinement on Ubuntu Touch restricts application to accessing ...
Robert Schroll's user avatar
1 vote

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

Unfortunately there's no way yet to set a certain orientation programatically. You can however lock the orientation for your app on a certain one (portrait or landscape) in your app's desktop file. ...
Zsombor Egri's user avatar

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