Questions tagged [qtquick2]

Qt Quick is a modern user interface technology that separates the declarative UI design and the imperative programming logic. Instead of the traditional C++ APIs of Qt, the presentation layer of the application is written with a Qt-specific declarative language called QML.

The Qt Quick module is the standard library for writing QML applications. While the Qt QML module provides the QML engine and language infrastructure, the Qt Quick module provides all the basic types necessary for creating user interfaces with QML. It provides a visual canvas and includes types for creating and animating visual components, receiving user input, creating data models and views and delayed object instantiation.

The Qt Quick module provides both a QML API which supplies QML types for creating user interfaces with the QML language, and a C++ API for extending QML applications with C++ code.

For more details, see the introduction to Qt Quick page in the Qt reference documentation.

2305 questions
1
vote
3 answers

How to import javascript file to qml worker script

I'm creating an application in me where I want to download data from the internet. To avoid blocking of main thread I created a WorkerScript file. This works fine, but I need to abstract certain parts (like authorization, proper header, etc) to…
1
vote
1 answer

How to make delegate of ListView change its size when view's parent is resized?

I followed the Qt 5.2 documentation on ListView (http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#details). My code is almost identical to the doc except for the contactDelegate's width which I want to bind to the width of the Rectangle…
Robert Wloch
  • 243
  • 4
  • 9
1
vote
1 answer

Applying animation to all images in a grid layout in QML, instead of animating each one

I have this code and the thing is I need to apply animation on all of the images, but couldn't find any way of doing it. Any help is appreciated. Image { id: img3 source: "iconborder.jpg" height:80 width:80 Image { id:…
Jino
  • 345
  • 1
  • 2
  • 16
1
vote
1 answer

initialize error of ComboBox : Cannot read property 'constructor' of undefined

When I try to initialize the model of ComboBox, weird error pop out test.pro # Add more folders to ship with the application, here folder_01.source = qml/androidTest folder_01.target = qml DEPLOYMENTFOLDERS = folder_01 #QMAKE_CXXFLAGS +=…
StereoMatching
  • 4,971
  • 6
  • 38
  • 70
1
vote
1 answer

How to run QTQuick test

how can I run tests for QtQuick-Applications in the main.cpp? The main.qml have a rectangle and inside some buttons. The test class MouseClick.qml implements the javascript test functions who should push the buttons. int main(int argc, char…
Andreas
  • 636
  • 1
  • 12
  • 29
1
vote
1 answer

How to add Fullscreen icon in Qt in the title bar of an OSX app?

I recently started developing an app in C++ & Qt 5.1 and I would like to have the double-arrowed icon on the title bar of my window like other Mac apps. I created a QtQuick 2 Application project and the default code doesn't make this button…
jnconte
  • 19
  • 3
1
vote
0 answers

How to reuse code if I have two similar Component?

For example I have two following Components: // ItemA.qml import QtQuick 2.0 Item { // a lot of attributes ... PartA {} // more attributes ... } // ItemB.qml import QtQuick 2.0 Item { // a lot of attributes ... PartB {} // more…
yzn-pku
  • 1,082
  • 7
  • 14
1
vote
0 answers

Knobs effect in QML

I’m trying to implement a custom widget in QML to obtain an effect such as http://anthonyterrien.com/knob/ [× Angle offset element in the page]. I tried with canvas object but if I apply a scale to the parent object of the canvas the quality of the…
Alessandro
  • 51
  • 3
1
vote
1 answer

Print QQuickItem to printer

How to print QQuickItem to printer? QQuickItem = basically any QML element, like Text or Rectangle, and its children alternatively: how to convert QQuickItem to bitmap / QImage for printing?
Jarno Argillander
  • 5,885
  • 2
  • 31
  • 33
1
vote
0 answers

QML global variable

I want to expose a global variable from C++ to QML, but I'm not able to make it accessible for all QML files. I'm trying to add my context property to the QQmlEngine root context because, according to the documentation: QQmlEngine…
user1204395
  • 568
  • 1
  • 4
  • 16
1
vote
1 answer

Canvas uses a lot of CPU

I am using Canvas in QML to draw rotating Rectangle with OpenGL. Here is the code: //... property variant points: [] onPointsChanged:{ canvas.requestPaint(); } //... Canvas{ //... onPaint:{ var ctx = canvas.getContext('2d') …
Smitis
  • 318
  • 1
  • 4
  • 17
1
vote
1 answer

QtQuick2 Can't connect ApplicationWindow closing signal to method (C++ novice)

I'm having trouble binding an "On Close" event for my application written in QtQuick. What I'd like to do is do the standard "confirm exit" method and maybe I'm going about this the wrong way. As I understand it I want something like void…
Daniel B. Chapman
  • 4,647
  • 32
  • 42
1
vote
1 answer

QtQuick 2 file size of download differ on windows

I wrote a small download script in the C++ part of my QtQuick2 app. This works just perfectly fine when I'm building the app for Mac OS 10.9. For testing I download this file and when it's done I verify it against the given md5 check sum…
Chriffer
  • 45
  • 8
1
vote
2 answers

QtQuick2: Handle onWheel event inside of a ScrollView

I have to put component X inside of a ScrollView. Component X has to handle mouse wheel event, but ScrollView handles it. So, following example (simplified) doesn't work. How to let Rectangle's mouse area handle OnWheel event? import QtQuick…
Evgeny Timoshenko
  • 3,119
  • 5
  • 33
  • 53
1
vote
0 answers

WebView with QtQuick2

I can't seem to get a WebView working with QtQuick 2. The error is objc[71279]: Class QNSListener is implemented in both /Qt5.1.1/5.1.1/clang_64/plugins/bearer/libqcorewlanbearer.dylib and…
1 2 3
99
100