Questions tagged [qtquickcontrols]

The Qt Quick Controls module provides a set of controls that can be used to build complete interfaces in Qt Quick. The module is new in Qt 5.1 and requires Qt Quick 2.1.

Qt Website

The Qt Quick Controls module provides a set of controls that can be used to build complete interfaces in Qt Quick. The module is new in Qt 5.1 and requires Qt Quick 2.1.

254 questions
2
votes
1 answer

QML TreeView items are not updated when emitting dataChanged

I have a QML TreeView like this: TreeView { id: treeview model: myModel anchors.fill: parent alternatingRowColors: false headerVisible: false TableViewColumn { title: "Name" role: "name" delegate:…
Korchkidu
  • 4,908
  • 8
  • 49
  • 69
2
votes
1 answer

How to add a editable TableView header in qml?

import QtQuick 2.7 import QtQuick.Controls 1.3 import QtQuick.Controls.Styles 1.3 Rectangle { width: 640 height: 480 ListModel { id: tstModel ListElement { animal: "dog" } } TableView { id: tableView …
Hunker
  • 97
  • 9
2
votes
1 answer

QtQuick - make TableView update its rowCount after its model has changed

I have a TableView that I want to fill dynamically after it is created - i.e. I read a list of strings from my c++ app that I want to set as the model of the TableView. I use a ListModel for that, I fill it with no problems from the…
tomj
  • 1,089
  • 7
  • 17
2
votes
1 answer

How to open ComboBox dropdown menu?

I'm working on a custom ComboBox item with two icons in both sides and a ComboBox in the middle. I want that when any of the icons are clicked the ComboBox dropdown menu opens, but i don't know how to do it. Here is my code: //…
Jumper
  • 151
  • 1
  • 14
2
votes
1 answer

QML StackView push component with properties

In QML StackView docs it is mentioned that you can push item with properties like this: stackView.push({item: someItem, properties: {fgcolor: "red", bgcolor: "blue"}}) Is there a way with which we can push component with properties? My components…
Akash Agarwal
  • 2,326
  • 1
  • 27
  • 57
2
votes
2 answers

"Bind" two QML CheckBoxes together, ensuring their states are always identical

I'd like to create two checkboxes on different pages of a GUI such that they are semantically the "same" checkbox -- same label, same effect. (Having them on both pages is just for the user's convenience.) This requires "binding" two CheckBox QML…
Kyle Strand
  • 15,941
  • 8
  • 72
  • 167
2
votes
1 answer

Resolve resource ambiguity in QML imports

I need to use both QtLabs and QtQuickControls. Both have the Button type but I need to use the one in QuickControls. The QML file is picking the button in labs. How do I force it to use the one in QuickControls? import QtQuick 2.6 import…
Akash Agarwal
  • 2,326
  • 1
  • 27
  • 57
2
votes
2 answers

Qml ListView empty rows placeholders like in TableView

I want ListView to display empty rows till the end of its height. Like TableView but with ListView. Is that possible?
user2487382
2
votes
1 answer

How to customize a QML Slider tickmark?

I'm trying to customize a QML slider component. I'm aware of QML Slider and QML SliderStyle Type for QtQuickControl customization. And according to the documentation SliderStyle Doc I should be able to assign a component to the tickmarks property. I…
Waldez Junior
  • 427
  • 5
  • 12
2
votes
0 answers

How Can I extend a qtquick control?

Here in this tutorial a custom control named PieChart has been created by extending But I need to extend QQuickTextEdit I tried to find it but it seems QQuickTextEdit class is not available in in Qt framework. So I'm not able to…
a.toraby
  • 3,232
  • 5
  • 41
  • 73
2
votes
1 answer

How to change the colour of selected item in Tumbler

I am trying to familiarise myself with QML and was looking at the nice example involving TumblerColumn. I have a simple spinner column as: TumblerColumn { id: yearColumn width: characterMetrics.width * 4 +…
Luca
  • 10,458
  • 24
  • 107
  • 234
2
votes
2 answers

What is the most formal way to invoke C++ code in response to a QML button?

Using qt 5.5, qt quick controls 1.4 and the below qt creator boilerplate code: what is the most FORMAL way to invoke C++ code in response to a button (just debug text to screen)? // main cpp #include #include…
Raiden Core
  • 1,535
  • 12
  • 13
2
votes
1 answer

Setting default starting directory for FileDialog

I am trying to set a default starting directory for FileDialog in QtQuick, but it does not work (meaning it always opens the executable's directory) : property url defPath : "/home/saeid/Work/data"; FileDialog { id:dialogPosPath; …
Dumbo
  • 13,555
  • 54
  • 184
  • 288
2
votes
1 answer

Unable to position custom styled Tumbler

I am trying to give a Tumbler my own style. I declare the Tumbler like this: Tumbler { style: MyTumblerStyle {} height: UIConstants.smallFontSize * 10 width: UIConstants.smallFontSize * 3 TumblerColumn { model:…
Nathan
  • 7,099
  • 14
  • 61
  • 125
2
votes
0 answers

Using TextAreaStyle in TextArea on android destroys native behavior (Qt/QMl)

I am using a TextArea in a Android Qt/QML project. On default selecting text by pressing long works as expected on android (like the native behavior). But when I apply a style, for example an empty one like this: TextArea { style: TextAreaStyle…
Nathan
  • 7,099
  • 14
  • 61
  • 125