Questions tagged [qt-quick]

Qt Quick is a framework that provides a declarative way of building custom, highly dynamic user interfaces with fluid transitions and effects, which are becoming more and more common especially in mobile devices.

Qt Quick is a framework that provides a declarative way of building custom, highly dynamic user interfaces with fluid transitions and effects, which are becoming more and more common especially in mobile devices.

Qt Declarative is a runtime interpreter that reads the Qt declarative user interface definition, QML data, and displays the UI that it describes. The QML syntax allows using JavaScript to provide the logic, and it is often used for this purpose. It is not the only way, however: logic can be written with native code as well.

Qt Quick and QML are officially supported in Qt 4.7 (with Qt Creator 2.1), and it is a commercial option in mobile applications when Qt 4.7 is available for deployment in Symbian and Maemo/MeeGo devices.

Qt Quick provides everything needed to create a rich application with a fluid and dynamic user interface. It enables user interfaces to be built around the behavior of user interface components and how they connect with one another, and it provides a visual canvas with its own coordinate system and rendering engine. Animation and transition effects are a first class concept in Qt Quick, and visual effects can be supplemented through specialised components for particle and shader effects.

Video Course

Pluralsight offers a course, Qt Quick Fundamentals, which specifically targets learning Qt Quick. It is part 2 of a three part course on the Qt framework.

Pluralsight is subscription based, but if you're only interested in Qt or Qt Quick you can send the author @todgentille a private tweet and request a week long VIP pass. You'll get unlimited access to the higher subscription level for a week that allows viewing online and offline and you can download the course materials.

884 questions
6
votes
2 answers

Animation for Qml Loader when loader.source changes

Is there any way to apply animation when we change source of Loader component in QML? For example suppose I have the following Loader: Loader { anchors.fill: parent id: loader } I want an animation from left to right when I set…
a.toraby
  • 3,232
  • 5
  • 41
  • 73
6
votes
2 answers

Where to put Qt QML non-visual application components

(I'm using Qt 5, QtQuick 2, with Controls.) I'm writing my first QML application and would like to maintain modularity and relatively small file lengths. There are certain things that come in big batches that I would like to tuck away into helper…
Andrey Mishchenko
  • 3,986
  • 2
  • 19
  • 37
6
votes
4 answers

How to generically refer to prev/next sibling elements?

For instance, if I wish to anchor to the parent element, regardless of what its id is, I can write anchors.top: parent.bottom. But what if I wish to anchor to the previous sibling, or next sibling? Can that only be done by id, or is there a way to…
temporary_user_name
  • 35,956
  • 47
  • 141
  • 220
6
votes
2 answers

How to create a message dialog using QML Control elements(such as combobox, textfield, checkbox..)

I want to create a message dialog in the following way For example:My combobox has 2 name, “chkbx”(symbolic name for the checkbox), “txtedt”(symbolic name for the text field). Whenever i select chkbox or txtedt from combobox drop down list, then my…
User
  • 619
  • 1
  • 9
  • 24
6
votes
2 answers

How to bind buttons in Qt Quick to Python PyQt 5

How can bind the buttons I create in a .qml script to python PyQt5 code? example: python: import sys from PyQt5.QtCore import QObject, QUrl, Qt from PyQt5.QtWidgets import QApplication from PyQt5.QtQml import QQmlApplicationEngine if __name__ ==…
Daivid
  • 627
  • 3
  • 12
  • 22
6
votes
1 answer

QML form layout

I use QML for UI in my app and now I want to build some form. This is a code: Window { width: 400 height: 600 flags: Qt.Dialog modality: Qt.ApplicationModal GridLayout { id: mainLayout columns: 2 …
folibis
  • 12,048
  • 6
  • 54
  • 97
6
votes
2 answers

64 bit integers in QML

How do I deal with 64 bit integers in QML? I know that useless Javascript can't handle them normally as it uses doubles for everything, and if I try to use them in a signal, everything gets set to undefined. Is there a way around this? Perhaps I…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
6
votes
2 answers

QML view wont update when adding a new item to a QAbstractListModel based model

I've figured out how to bind a model derived from QAbstractListModel to a QML view. But the next thing I tired does not work. If a new Item is added to the model the QML view will not update. Why is that? DataObject.h class DataObject { public: …
avb
  • 1,701
  • 5
  • 22
  • 37
6
votes
1 answer

How to print(with the printer) a QML object?

I have designed a sales receipt with Qt Quick and I want to print it with the printer. How can I do this? Here is my main.cpp QtQuick2ApplicationViewer…
Slim
  • 306
  • 3
  • 11
6
votes
2 answers

How to prevent blurry QtGraphicalEffects from being cut off?

I'm trying to add effects to my items using QtQuick 2 with QtGraphicalEffects, but I don't quite understand how to tweak really blurry effects to look right. In this case, the drop shadow is poorly sized and is getting clipped at the edges before…
cgmb
  • 4,284
  • 3
  • 33
  • 60
6
votes
3 answers

QML How to put text cursor at the end of TextEdit element

I have a QML TextEdit element, I plan for append some text and put the cursor at the end. My method: import QtQuick 1.1 Rectangle { color: "black" anchors.fill: parent focus: false TextEdit { id: txtCommands color:…
Bình Nguyên
  • 2,252
  • 6
  • 32
  • 47
6
votes
1 answer

How to pass QList from QML to C++/Qt?

I'm trying to pass QList of integer from QML to C++ code, but somehow my approach is not working. With below approach am getting following error: left of '->setParentItem' must point to class/struct/union/generic type type is 'int *' Any inputs to…
DNamto
  • 1,342
  • 1
  • 21
  • 42
6
votes
5 answers

QML: How to move items within a grid

I have a 4x4 grid and I want to associate arrow key presses with the movement of items within the grid. How does one do that? Here is a sample QML: import QtQuick 1.1 Rectangle { id: main; width: 500; height: 500; color: "darkgreen"; …
Xolve
  • 22,298
  • 21
  • 77
  • 125
5
votes
1 answer

How to modify a QML Text from C++

I'm new to Qt and I'm trying to modify a QML Text (showed in the screen) from the C++ code. I get the text modified but it is not updated on the screen, so I have the text variable modified but the first text on the screen. Here is the…
azorrozua
  • 129
  • 1
  • 4
  • 12
5
votes
1 answer

QML: How to destroy or stop workerscript in QML

I am trying to use WorkerScript for loading list model elements in QML. But how can we stop WorkerScript once we are done with the update; is there any way of destroying or stopping the WorkerScript ?
kbalar
  • 359
  • 2
  • 5
  • 16