Questions tagged [qml]

QML (Qt Modeling Language) is a declarative language that allows user interfaces to be described in terms of their visual components and how they interact and relate with one another. It is a highly readable language, JSON-like syntax with support for imperative JavaScript expressions combined with dynamic property bindings. It can be used to build fluid animated user interfaces that can be connected to any backend C++ libraries.

QML is a declarative language that allows user interfaces to be described in terms of their visual components and how they interact and relate with one another. It is a highly readable language that was designed to enable components to be interconnected in a dynamic manner, and it allows components to be easily reused and customized within a user interface. Using the QtQuick module, designers and developers can easily build fluid animated user interfaces in QML, and have the option of connecting these user interfaces to any back-end C++ libraries.

Resources

11756 questions
88
votes
4 answers

Qt Designer vs Qt Quick Designer vs Qt Creator?

I have seen references to all three of these applications on various parts of the Qt website but am completely unclear as to the exact differences between them and whether they are actually separate things or just different names for the same thing,…
temporary_user_name
  • 35,956
  • 47
  • 141
  • 220
84
votes
2 answers

Difference between qt qml and qt quick

I'm confused with QML, QtQuick 1.0 and QtQuick 2.0. What's the difference between them? I use QtCreator 2.8.1 based on Qt 5.1.1. I want to develop a desktop program, which technology should I use?
骑天大圣
  • 854
  • 1
  • 6
  • 8
68
votes
3 answers

Difference between width, height and implicitWidth/Height and corresponding use-cases in QML

What is the difference between width/height and implicitWidth/Height in QML? When should one set the implicit dimensions instead of the regular? When should one ask the implicit dimensions instead of the regular from a component/item?
Silex
  • 2,583
  • 3
  • 35
  • 59
65
votes
6 answers

C++ signal to QML slot in Qt

I want to send a Signal from C++ to a Slot in my QML File. I already got it working without and primitive type parameters, although if I want to send a QString to my QML Slot I get an error whilst connecting. I connect in main.cpp QObject…
alex
  • 4,922
  • 7
  • 37
  • 51
55
votes
9 answers

How to access C++ enum from QML?

class StyleClass : public QObject { public: typedef enum { STYLE_RADIAL, STYLE_ENVELOPE, STYLE_FILLED } Style; Style m_style; //... }; The .h file has the above code. How to access…
Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411
51
votes
3 answers

Qt Designer C++ or QML for GUI

I know that the use of QML is quite new in Qt and I was wondering if I should design my application using Qt Designer or QML. I will be using a MVC pattern and my main concern if I use QML for the GUI is that it might not be easy to integrate inside…
clenemt
  • 793
  • 1
  • 7
  • 20
48
votes
1 answer

Warning about non-NOTIFYable properties in QML

I have a QML based application in Qt that generates some warnings at runtime: QDeclarativeExpression: Expression "(function $text() { return pinyin })" depends on non-NOTIFYable properties: hanzi::DictionaryEntry::pinyin I believe it refers…
laurent
  • 88,262
  • 77
  • 290
  • 428
45
votes
2 answers

Access C++ function from QML

I'm trying to make a little program with Qt. I have a main.cpp with the following code: #include #include "qmlapplicationviewer.h" Q_DECL_EXPORT int main(int argc, char *argv[]) { QScopedPointer
Mathlight
  • 6,436
  • 17
  • 62
  • 107
44
votes
4 answers

Qt/QML : Send QImage From C++ to QML and Display The QImage On GUI

I created a class Publisher which periodically emits a QImage object. However I'm having a tough time drawing the QImage to a QML element. It appears that the Image and Canvas QML components require a QUrl instead of a QImage, but I'm not sure how…
trianta2
  • 3,952
  • 5
  • 36
  • 52
43
votes
8 answers

Image rounded corners in QML

To my surprise, the Image component has no radius property. I tried emulating the rounded corners by putting the image in a rounded Rectangle, but it does not clip the corners. Rectangle { anchors.right: rectContentBg.left anchors.top:…
Tamás Szelei
  • 23,169
  • 18
  • 105
  • 180
42
votes
1 answer

How can I access my Window object properties from C++ while using QQmlApplicationEngine?

I've been trying to learn QtQuick for GUI creation, but I've been having a hard time understanding how to interact with QML objects from the C++ part of my test program. Here's my simple QML file: import QtQuick 2.2 import QtQuick.Window 2.1 Window…
MrKatSwordfish
  • 1,504
  • 5
  • 18
  • 30
40
votes
7 answers

How to create delay function in QML?

I would like to create a delay function in javascript that takes a parameter of amount of time to delay, so that I could use it do introduce delay between execution of JavaScript lines in my QML application. It would perhaps look like this: function…
Sнаđошƒаӽ
  • 16,753
  • 12
  • 73
  • 90
38
votes
5 answers

Qt5. Embed QWidget object in QML

I am using Qt5 beta and trying to embed a QWidget-based object into QML. The goal is to use QML as much as possible, and only use QWidget objects where QML does not do what I need. I found a link explaining how to do this for Qt4.7, but I have not…
eatyourgreens
  • 1,053
  • 1
  • 12
  • 16
37
votes
4 answers

How do you assign a QML Item to a component property in QML and then use that object inside the component?

I'm trying to create a QML object that acts like a wrapper for other objects. Here's my QML file (Container.qml): Item { property string label property Item control Row { Label { text: label } //…
Jack Benson
  • 645
  • 2
  • 6
  • 8
37
votes
7 answers

declare global property in QML for other QML files

I want to declare a global property in a config file and use it in other files. for example declare mainbg in: Style.qml: property color mainbg: 'red' and use it in other QML files (like view.qml and main.qml). How can I do this work?
Vahid Kharazi
  • 5,723
  • 17
  • 60
  • 103
1
2 3
99 100