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
0
votes
1 answer

How can I get the width of each line of text in a label (the last line in particular)?

I have a label in my app that displays multiline text by setting wrapMode: Text.WordWrap. Is there any way to calculate the location (x and y) of the end of the last line of text in the label given a constrained width? In other words, if my label is…
MusiGenesis
  • 74,184
  • 40
  • 190
  • 334
0
votes
1 answer

how i can bind qtquick button control in pyqt5

Hello how i can bind a qtquick button in pyqt5, i have two file one for qml and one for python now i want that the button should do something for example just print something so how i can bind now, Button.py import sys from PyQt5.QtCore import…
Habib
  • 101
  • 7
0
votes
1 answer

ApplicationWindow with Toolbar cannot hold SwipeView because of import errors

I am using Qt Opensource 5.10.0 with Qt Creator 4.5.0 based on ArchLinux 64bit. and the docs for ApplicationWindow states it requires QtQuick.Controls 1.4: import QtQuick 2.10 import QtQuick.Controls 1.4 ApplicationWindow { width: 640 …
KernelPanic
  • 2,328
  • 7
  • 47
  • 90
0
votes
1 answer

Updating multiple QImages on QML::Image view displays only the last one sent

I have Image qml component to display QImages. Following is the QML code for it. Code: Item { Image { id: my_qimage_viewer anchors.fill: parent } Connections { target: qimage_selector_cpp_backend …
TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
0
votes
2 answers

QML Calendar: list of visible days

Is there a way to get a list of visible days for the current month view (including the ones from previous/next month that are also visible)
laurapons
  • 971
  • 13
  • 32
0
votes
2 answers

Doing somethings when state be replaced

I wants to change some property or run scripts when particular state exits. In formal, I will use a variable to save the previous state. When the state changing, checking previous state and determine whether run scripts. But code will more redundant…
A.J
  • 338
  • 1
  • 4
  • 16
0
votes
0 answers

Qt Quick item selection

I have a question about selecting an item. I want to create a system.And this system will start like that. I have two squares and one button. When I click a button and which square is selected, this square will be moving. For example, I've selected…
0
votes
1 answer

ReferenceError: down is not defined in SpinBox QML

I am referring to https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-spinbox and copy pasted the same code, But i am getting following errors: ReferenceError: down is not defined and ReferenceError: up is not defined. Code: import…
pra7
  • 834
  • 2
  • 21
  • 50
0
votes
1 answer

QML - Not able to canvas.requestPaint() from a function

I am a beginer and i am not getting how to call canvas.requestPaint() in My QML ,Code is below: //myTab.qml TabView { id: tv width: parent.width height: parent.height antialiasing: true style: TabViewStyle { …
pra7
  • 834
  • 2
  • 21
  • 50
0
votes
2 answers

For QML, why LayoutMirroring doesn't work in Slider?

Today I tried the Slider in QtQuick.Controls, my slider is left to right, I want to set my slider as from right to left by using LayoutMirroring.enabled, at last I found I cann't inverted the slider. Here is my little demo code, so how can we…
AdvancingEnemy
  • 382
  • 3
  • 20
0
votes
2 answers

How to implement swipeview QtQuick 2.5

I have QT 5.5 and it won't support SwipeView. I tried doing with listView but I am not getting what I expected. I want a similar functionality code in QT 5.5 like the code given below which is written in QT 5.6. Please help import QtQuick 2.6 import…
snehitha
  • 91
  • 1
  • 6
0
votes
1 answer

QML reset dialog with tabview

I was trying to implement a tabbed Dialog in QML with the means to reset it to the intial values. Since tabs are dynamically instantiated, none of the straight forward methods seem to work. The parent Dialog can not reference the inner Combobox and…
0
votes
1 answer

Two toolbar in header QtQuickCOntrols 2

I start on Qt Quick and I want to develop an application that will be deployed on an embedded system. I'm using Qt Quick Controls 2. I'm trying to create two toolbars in my header: a toolbar consisting of icons (battery level, network connection,…
Sucre
  • 13
  • 4
0
votes
1 answer

Why does my custom TabBar lose it's content children in this example?

I am trying to create a TabBar has preview images of the connected layout's children. However after adding several tabs (the exact number depends on the number of elements within the tabs) QML throws an error and the PreviewTabBar loses all its…
Herr von Wurst
  • 2,571
  • 5
  • 32
  • 53
0
votes
1 answer

Call a function when screen is unlocked

I have opened and focused app on android phone, and I lock the screen. When I unlock it, I want to call a specific function. I was thinking about Qt.application.state, but how to call function when it has changed?
user6285273