QFormLayout equivalent in QtQuick2?

I am in the process of porting a application based on QtWidgets over to QtQuick2. I am trying to figure out what QtQuick layout items I should use. I am stuck at QFormLayout. I simply cannot find an equivalent. The best I could find is a GridLayout,

QML: Resize CheckBox

I have ListView with my own delegate. import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 ItemDelegate { height: 40 Row { spacing: 10 anchors.verticalCenter: parent.verticalCenter CheckBox { } } } The problem is that check boxes

How to implement the master details view in Qt / QML (part 2)

I previously asked how to implement a Master Details View in Qt/QML here: How to implement a master-details view Qt/QML on an Android tablet?. Having continued working on this, I came out with the following mockup QML layout: import QtQuick 2.7 impor

QML's 'Custom Menu' option moves up

I am trying to create a "menu" in QML with custom data in each option For requirements of my application, I need to show it loading the QML file dynamically (Qt.createComponent). What I need is to show some fixed options in the bottom part, and

Modify QML ListView Delegate from C ++

I am trying to change the delegate of qml listview from C++ but currently I stuck at how to change the alias which represents the delegate property. Update on details: I have multiple delegates in separated qml files, in my application there are many

QML / C ++ Master / Detail ComboBox / Listview

On Qt 5.7, Quick Controls 2.0, I have a master ComboBox with a slave ListView. How can the slave change when the user changes the ComboBox selection? For exemple: Imagine that I have a list of persons, and every person has a list of cars: Person1 - c

QML audio playlist

I am making a simple playlist player on qml. I mean there is a Audio player which plays files with extension .mp3 in a folder. But this "playlist player" assumes the whole folder as a playlist. So I give the path of the playlist folder as a comm

Tree crossing in QML, checking if QModelIndex isValid

In order to expand the nodes of a TreeView to show the currently selected item (set by a shared selection model) I need to call TreeView.expand(QModelIndex) recursively. expand(index) expand(index.parent) expand(index.parent.parent) ... this could be

QML Depth Buffer and Buffer Buffer Issues

I'm using QML, and wanted to run custom OpenGL code. I created a custom Widget in C++ (extending QQuickItem) and overrided the paint function(). When I run my application, the console prints QSGContext::initialize: depth buffer support missing, expec

QML encapsulation without creating new files

Let's consider the following example: ColumnLayout { spacing: 10 Label { color: "green"; text: "one text" } Label { color: "green"; text: "another text" } Label { color: "green"; text: "some text"

How to call QML Menu :: addMenu without warnings?

I want to dynamically build a QML context menu. When I call 'addMenu' the menu entry is added, but I get this warning: QQmlComponent: Created graphical object was not placed in the graphics scene. Here is the code to reproduce the issue: import QtQui

How to organize TabView tabs in multiple lines?

From: http://doc.qt.io/qt-5/qml-qtquick-controls-tabview.html#details TabView { Tab { title: "Red" Rectangle { color: "red" } } Tab { title: "Blue" Rectangle { color: "blue" } } Tab { title: "Green" Rectan

How can I install QtWebEngine on Ubuntu

When a QML program (e.g. Ethereum, installed from the PPA in this case) tries to import QtWebEngine 1.0 import QtWebEngine.experimental 1.0 Then I get these errors file:////usr/share/mist/qml/views/browser.qml:5 module "QtWebEngine" is not insta

QML How can I get the current index of items in ListView?

As example: import QtQuick 2.4 import QtQuick.Controls 1.3 import QtQuick.Window 2.2 import QtQuick.Dialogs 1.2 ApplicationWindow { width: 250 height: 250 visible: true Rectangle { anchors.fill: parent ListModel { id: colorsModel ListElement { colorC

Draw an arc / circle area in QML?

I know that it is possible to draw a circle in QML using the following code: Rectangle { width: 150 height: 150 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top color: "#095e7b" border.color: "#0a2f4a" border.w

dynamic repair in qml

I want to change dynamicaly type of qml Item without re-creation. In this example window transforms into popup window and question is how to transform it to qml Item. ApplicationWindow { title: qsTr("Hello World") width: 640 height: 480 Window {

how to access events from a specific QML control from c ++

Is there a way of accessing signals(such as clicked()) of a QML control such as a button, from c++. Assume that I have the memory address of that specific control. I just want to simulate a click event from c++ code.Easy. You just create a slot in a

QML nested list view with separators

I'm trying to implement a tree view that represent structure of buildings/floors/rooms. All rooms should be classified by floor and building ( thus header for each building and floor is required. First I implemented it with Repeater, Row and Grid ele

BlackBerry 10 development switch shell

I am developing one Calculator app in BlackBerry 10 and for that I am using switch case to get the button ID but I don't know how to get the ID of button in switch case. For Example: switch(?){ case button_addition: case button_minus: case button_mul

BlackBerry 10 - Adding ImageView to the container

I'm trying to add an ImageView to container, by it doesn't appear on the screen. Container is created in QML, but I want image to be added in .CPP file. ApplicationUI.cpp: ApplicationUI::ApplicationUI(bb::cascades::Application *app) : QObject(app) {

Get $ HOME and / or username in QML

I need to know how to get the user name and/or home directory of the users. I've googled around for a while but can only find the variables for C++ or BASH. How do I get the user name or home directory? I'm writing in QML.You would have to get the Us

Qt QML drop-down list as in HTML

Simple thing, but can't get find it. I want a simple dropdown selection box with a couple of selections. Like in HTML <select> <option>1</option> <option>2</option> </select> what is the code for QML for that ?Here's a

Qt-based Qt File Browser

It is easy to implement a file browser by using QFileSystemModel. But the listview UI is not pretty. So I want to implement a file browser using QML. the QML has model/view support. But how to display the filesystem tree in QML? Any clue would be app

QML Text Scroll

I am using C++ and QML to create a nice interface. I would like to have a "console view", where plenty to text is printed through time. However, when the text of a text item or webview content grows, the view does not "scroll down". Ho