qtquick2 Questions

4

I want to use a QtQuick Image object in a simple Qt project, and include the image in the project. I have added the image to the resource file. I have used debugging to be sure that the resource ex...
Parclose asked 29/10, 2013 at 18:13

4

Solved

I am trying to do nested properties like 'font.family' or 'anchors.fill', but I cannot initialize them in normal way because it prints 'Cannot assign to non-existent property'. Instead I am forced ...
Jeff asked 27/1, 2015 at 11:42

11

Solved

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 the a...
Pen asked 20/11, 2013 at 6:45

2

Solved

https://doc.qt.io/qt-5/qml-qtquick-controls2-menubar.html MenuBar is supported in ApplicationWindow and not in Window. Following throws an error "Invalid property name: MenuBar" Window { ...
Vinegarroon asked 27/11, 2020 at 16:39

3

Solved

I want to align Rectangles in a RowLayout left to right. In below code example two Rectangles share additional space instead stack one after another. I used Layout.alignment: Qt.AlignLeft in RowLay...
Archicarp asked 8/11, 2017 at 18:20

6

The look and feel I'm trying to go for is to have a solid color button, and text on it like "Hello World" where the text is completely transparent, and the background shows through the button. In...
Burkhard asked 6/10, 2016 at 18:53

7

Solved

From here: https://mcmap.net/q/82398/-add-the-installation-prefix-of-quot-qt5widgets-quot-to-cmake_prefix_path I tried this: cmake_minimum_required(VERSION 2.8.12) project(qtquick_hello_cmake) ...
Seritaserjeant asked 5/12, 2017 at 6:3

2

Solved

This works as intended with Row, but not with RowLayout. Why? What is the difference between the two? ApplicationWindow { title: "Testing" width: 640 height: 480 //RowLayout { Row { ancho...
Protrusile asked 7/4, 2015 at 2:59

3

Solved

Like we have preprocessor directives in C++ for conditional includes. Similarly, how to do conditional importing in QML? if x import ABC 1.0 else import PQR 2.0
Kasey asked 12/12, 2014 at 9:22

5

Solved

I’m looking for a way of dragging frameless window in QtQuick2. I followed this thread on the forum Link but it gives me an error. Main difference in the code is that my code uses QtQuick2Applicat...
Legislate asked 21/9, 2013 at 0:4

8

Solved

To test QML deployment I've created a very simple QML application. Here is the code: main.cpp #include <QApplication> #include <QQmlApplicationEngine> #include <QFile> int main...
Aftmost asked 31/7, 2014 at 0:27

7

I would like to know if it's possible to use (several) different delegates for a QML ListView. Depending on the individual object in the ListView model, I would like to visualize the objects with...
Prototype asked 13/8, 2015 at 10:43

4

Solved

I'm writing my first QML/Javascript app for QtQuick 2.0. I need to place a DatePicker control, but I haven't found any control like that under QtQuick.Controls -and nowhere, in fact-. I'm startin...
Salesman asked 16/1, 2014 at 4:8

2

QML introduces a separate ownership (QObject) tree from the visual tree (QtQuick scene graph). parent returns the visual parent. children returns the visual children. data returns the QObject chi...
Murguia asked 19/10, 2013 at 22:9

3

Solved

I have been trying to use a QML TableView to display a QAbstractTableModel. The missing part of the equation seems to be that it is not possible to have a variable number of columns in the TableVie...
Mackinaw asked 1/12, 2014 at 14:42

5

Solved

All my dialogs appear on the top left corner of screen instead of the center. What is the best way to let the dialogs be placed automatically correct? import QtQuick 2.7 import QtQuick.Controls...
Darsey asked 12/7, 2017 at 7:43

3

The QT document had implied that any implementation of QAbstractItemModel can be used for TreeView. These models are usually in C++, which is inconvenient for now. So is there an native QML mod...
Assemblage asked 20/4, 2017 at 9:28

3

Solved

In the process of studying QML and QtQuick, the following question arose. How can I make the text automatically reduce the font size by decreasing the element in which it is located. Now I have th...
Revival asked 5/6, 2017 at 7:46

2

Solved

I'm trying to create a tabbed pages in qml. I used TabBar associated with StackLayout: TabBar { id: bar width: parent.width TabButton { text: qsTr("Home") } TabButton { text: qsTr("Discov...
Aggrade asked 1/8, 2019 at 8:38

2

I want to create an application without the title bar, but with native close, minimize and maximize buttons. This is the intent of the layout: The app is built using Go and QML. I was able to re...
Hyssop asked 5/3, 2015 at 13:4

2

Solved

I have a width property on a QML Rectangle that is set based on another Rectangle with an id of mainwindow and one of the array properties of mainwindow: width: mainwindow.width/mainwindow.numCols...
Rostrum asked 25/10, 2013 at 7:5

8

Solved

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 { anchor...
Mortality asked 22/5, 2011 at 20:58

3

Solved

Consider this JS code: function handleSig() { emitter.someSig.disconnect(handleSig); // do some work here } emitter.someSig.connect(handleSig); Can it be written without the explicit disconne...
Joacima asked 10/7, 2017 at 18:15

2

It is possible to create QML components from files using Qt.createComponent(filename) It is possible to create QML object from strings using Qt.createQmlObject(string) It is possible to create QM...
Saunder asked 3/12, 2014 at 11:17

5

Solved

I have a row with items which should stack when the window width gets too small for displaying all items in a row, as shown in the following sketch: The Flow component stacks the items but they ...
Transalpine asked 1/11, 2015 at 12:24

© 2022 - 2025 — McMap. All rights reserved.