12,148 questions
1
vote
1
answer
34
views
dynamic qml object creation does not set properties
I would like to create a dynamic keyboard with 9 keys (nine), and I have created a JavaScript code that should create the buttons and place them in a 9x9 grid:
for (var row = 0; row < 3; row++) {
...
1
vote
0
answers
49
views
An error occurred when registering a C++ class using QML_ELEMENT: QQmlApplicationEngine failed to load component
I wrote a simple example while learning QML and CMake. The main purpose is to demonstrate how to use `qt_add_qml_module` and how to register C++ classes in QML.
the key code is as follows:
**//...
4
votes
1
answer
69
views
Declare nested QML enum
I have a nested Item where I want to declare an enum. How can I access the enum from the parent Item? I dont want to declare the enum in the outer Item, because it belongs to the nested/inner Item. I ...
2
votes
1
answer
82
views
TextInput on SpinBox with custom inputMask
I have a SpinBox with a custom TextInput as contentItem. I want it to display a quantity, so it want to display something like "10 / 20 pc." for example. The minimum value is always 1, the ...
4
votes
1
answer
124
views
Property binding strange behavior with QSettings
Update below
I have a strange behavior with a property binding in my application. When toggling the expanded property of my layout, the ColumnLayout is not resizing, and the space of the button "...
3
votes
1
answer
95
views
SpinBox TextFromValue callback not invoked
I have a ListView with SpinBoxes as delegates. I control the SpinBoxes to and value properties with a model-binding. This works fine. To display a formated text for my SpinBox I use the textFromValue ...
0
votes
0
answers
107
views
How to use CuteKeyboard (Free virtual keyboard) in Qt 6.8
I want to use the following Virtual Keyboard library in a Qt QML application.
https://github.com/amarula/cutekeyboard/
The plugin and application builds successfully, but when I start the application ...
1
vote
0
answers
114
views
CMake: QML warnings on Ubuntu 25.04: "link target it defines (Qt6::qtquick2plugin) does not exist in the current scope"
I'm trying to build Noteahead MIDI tracker (https://github.com/juzzlin/Noteahead) on Ubuntu 25.04 and getting a lot of CMake warnings like these:
CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/...
0
votes
0
answers
49
views
CMake files for Qt6QmlTooling not found despite installing all prerequisites from Debian repositories and the Qt installer
I'm trying to deploy my QML application to android_x86_64 using qt-cmake. I've installed all of the relevant packages from both the Debian package repositories and from the Qt Online Installer, ...
0
votes
1
answer
58
views
Qt GammaRay - how to find QML singleton value?
Windows 10, GammaRay v3.3, Qt 6.9, llvm_mingw
I've created module with QML files (using qt_add_qml_module). One of those file is Config.qml singleton component. This component is used by many ...
1
vote
1
answer
97
views
What's the actual difference between Qt.createComponent() + component.createObject() and Qt.createQmlObject()?
As far as I know, they both do the same thing: create a QML element and place it in the hierarchy of QML elements. My question however, is: what benefit do you gain from using one over the other? ...
1
vote
1
answer
120
views
Qt mouse area doesn’t act correctly
I'm trying to create an area where a button appears when you enter it.
The first approach fails: the button becomes visible, but it then blocks the MouseArea, which triggers onExited when hovered over....
2
votes
1
answer
86
views
Qt6 - Clipping a child rectangle to a parent rectangle with a radius using MultiEffect QML type
I am trying to make the first image, look like the second image
The goal to is to clip the green child rect to match the inside radius and edge bounds of the parent rect. Unfortunately, the clip ...
2
votes
1
answer
110
views
Qt Quick QML: SafeArea not working on Android devices
I am trying to create a Qt Quick mobile application using SafeArea to restrict the location of contents on the screen. It works well on desktop, but when I run it on my mobile device the margins ...
1
vote
1
answer
94
views
QML Repeater delegates display correctly but C++ ViewModel getWord() returns incomplete empty — what am I missing?
I’m working on a QUL / Qt Quick Ultralite application (targeting ESP32, using QUL 2.9.0) where I have:
A CharacterSelectors.qml component that uses a Repeater to render multiple character-selector ...
1
vote
0
answers
81
views
Executable needed to load QML on Android
I'm creating an app using purely QML (all the design and logic is in QML and JS) and I need to know whether, when deploying this app to Android devices, if I need to include a short executable which ...
1
vote
1
answer
122
views
How do I properly import or use XMLHttpRequest in QML?
For context, I'm trying to use XMLHttpRequest in QML to fetch some data from a site. I will then parse that JSON and do whatever is needed, but that's not the issue. Specifically, the issue is that ...
1
vote
2
answers
179
views
Three elements center one in a center and wrap sides
I'm using quickshell (there is not tag on stackoverflow for it) but I don't think it is relevant to the issue I'm having.
C # <--- absolute window center
| ...
0
votes
2
answers
108
views
Qt QML on VS Code complains about having correct corresponding revisions
The Qt Qml extension on VS Code keeps reporting:
/usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick.2/plugins.qmltypes:(row):(column): Meta object revision and export version differ.
Revision (x) corresponds ...
1
vote
1
answer
59
views
TableView and HorizontalHeaderView column widths do not match, even with syncView property set
I'm using Qt Quick (Qt 6.8) with a TableView and a HorizontalHeaderView. I’ve set up syncView so that the header and table should stay in sync:
HorizontalHeaderView {
id: header
Layout....
1
vote
2
answers
67
views
Can't change the color of text in ComboBox Popup dropdown menu (Qt QML)
I'm new to QML and I want to change the color of text in dropdown menu based on the the mouse cursor position (make text white when mouse is not pointing at it, so it is more visible), but seems like ...
0
votes
0
answers
69
views
PySide6-QtQuick QSGGeometryNode used in QQuickItem.updatePaintNode not visible and sometimes causes crash
I am writing an application in Python3.12 on Ubuntu, using PySide6.9 and QML.
I tried to create an own QQuickItem in Python as QmlElement to use it in QML.
I subclassed QQuickItem and used the ...
3
votes
1
answer
95
views
QML doesn't delete default values of component properties
I have a QML component with a property and a default value. If I instantiate this component and overriding the value of the component, the previous, default value is not destroyed.
Example:
The QML ...
1
vote
0
answers
218
views
module "org.kde.kirigami" and "org.kde.desktop" not installed
I'm following the tutorial: A full Python + Kirigami application to learn how to build Python applications using PySide6 and Kirigami for KDE, under Arch Linux and Fedora.
However, when running the ...
1
vote
2
answers
129
views
QML ListView flicking with fixed header
I want to have a QML ListView with a header that stays in place when the items are flicked or scrolled.
To achieve this, I have set the headerPositioning to ListView.OverlayHeader and changed the ...
0
votes
1
answer
90
views
Dont close Dialog onAccepted
I have a simple QML Dialog. On the footer-area I am using a DialogButtonBox to have some default buttons like "Cancel", "Yes", "Yes to all", etc. I want the dialog to ...
0
votes
1
answer
104
views
How can I resolve the error: module "QtCharts" is not installed? [closed]
I tried to run the following code, but I got the error: module "QtCharts" is not installed.
import QtQuick 2.15
import QtCharts 2.15
Rectangle {
id: root
width: 1392 * scaleFactor
...
0
votes
1
answer
89
views
Strange border around popup when adding drop shadow with MultiEffect
I'm attempting to add a drop shadow effect around a QML popup, but when I do this with a MultiEffect, it creates an additional border around the popup (beyond the shadow).
Here's a minimal QML example ...
0
votes
0
answers
57
views
XWayland surface detection in a QtWayland compositor
I'm trying to integrate rootless XWayland into the "minimal-qml" QtWayland compositor to understand how XWayland works. I've chosen this example because it features XDG-shell and that is the ...
1
vote
1
answer
66
views
ListView delegate height animation
I have a ListView with a SwipeDelegate as delegate. It's contentItem consists of a ColumnLayout with two RowLayouts inside. Now I want the second RowLayout to unfold, if I click the delegate. This ...
0
votes
2
answers
165
views
QML + OSM: Loading Offline Tiles from Local Drive
I am struggling to get Qt/QML to use downloaded tiles from local drive. The map is always generated with online tiles and not my local files.
I looked at many other posts but none of them worked for ...
2
votes
1
answer
108
views
Error "TypeError: Property 'smth' of object 'smth' is not a function"
I'm following a tutorial for a game on QML (link:https://www.youtube.com/watch?v=0Nbt2yO85d0&list=PLeYV3WjZWmHyYUe-BElUVNeFYTmpOQ9Xq&index=10&ab_channel=KALI)
I'm pretty sure that I have ...
2
votes
2
answers
178
views
QML: Shadow around an Item
Trying to implement shadow with MultiEffect like this:
MultiEffect {
anchors.fill: item
source: item
shadowEnabled: true
shadowColor: "#9B9B9B"
...
0
votes
0
answers
94
views
Why does QML Image::smooth not give the same result as Qt::SmoothTransformation when zooming out?
I’m working on a Qt application where I'm displaying a set of images (fields), and I have two ways of rendering them:
Stitched Image (Method 1):
All the fields are stitched together into a single ...
0
votes
0
answers
33
views
ERROR in Behavior DragHandler and PinchHander QML
I launched the Qt example "PointerHandlers" map.qml
And I found that after I performed the pinch movement and released one finger, the square for some reason changes its position
You will ...
0
votes
0
answers
75
views
How to combine QtGraphs and XYModelMapper?
How can I map the X- and Y-values from the QAbstractTableModel to QML Mapper in QtGraphs?
There must be some commands I have to fill in these QML code lines:
GraphsView {
antialiasing: true
...
1
vote
2
answers
124
views
QtQuick curve with rounded corners
I'm trying to create a spline in QTQuick using a ShapePath component, however I'm a bit lost and don't know where to start. The following gif and images are a reference for the result that I'm looking ...
0
votes
0
answers
75
views
How to implement custom scroll behavior using QWheelEvent in QGraphicsView?
I'm working with a QGraphicsView in Qt and want to manually handle scrolling using the mouse wheel by overriding wheelEvent.
By default, QGraphicsView scrolls automatically (inherited from ...
2
votes
1
answer
63
views
Find position of delegate in QML
I have an QML GridView that is displaying items from a model. A separate overlay needs to know the screen positions of the items within that GridView. However, I am having trouble accessing the ...
1
vote
2
answers
158
views
How to pre-load heavy qml pages and later push them to StackView
I have a QtQuick StackView application that involves some quite heavy pages. I want to pre-load some of the heaviest pages during app startup to reduce lag and wait time later on.
For reference, the ...
0
votes
0
answers
41
views
print available qml types
any ideas how to get a list of available QML types
declared in an unqualified namespace via Import
as well as declared in the current document via component
it would be most convenient to get not only ...
0
votes
0
answers
75
views
How to change font in QML project after importing FluentWinUI3 style?
I'm developing a Windows app using Qt 6.9 and QML, and want to use the FluentWinUI3 style. So I followed the page, adding import QtQuick.Controls.FluentWinUI3 on top of my MainWindow.qml file.
However,...
1
vote
2
answers
212
views
Qt6 MultiEffect qml Type : cannot set a larger mask than the source item
I want to customize a ProgressBar so it looks like this:
.
I need to crop the internal "light orange" rectangle so it fits in the orange background. I use MultiEffect to do that, but I can't ...
0
votes
1
answer
71
views
Why is it that when I set a MouseArea as the background for the TextField, only the hover event is triggered?
When I set the MouseArea event for the background of the TextField, I found that only the hover event was triggered.
My QML code is as follows:
TextField{
width:200
height: 30
background: ...
1
vote
1
answer
190
views
How do I correctly use QtCharts in a Qt Quick project? (QML works in qmlscene but fails in app)
I'm trying to use QtCharts (specifically ChartView, PieSeries, etc.) in a Qt Quick project using Qt 6.9 with MinGW on Windows.
Everything works perfectly when I run the QML with qmlscene, but as soon ...
3
votes
1
answer
195
views
How should I package my Qt/QML application for Ubuntu with a newer Qt?
I want to target Ubuntu 24.04, but with these requirements:
Qt 6.5.3+ (Ubuntu 24.04 sadly has only 6.4 in the repositories)
My application depends on librtmidi
This script worked pretty well, but it ...
0
votes
1
answer
171
views
How in a nested gridview expose a property of a function in qml
In the below example of code there is a GridView id:mainGrid nested in a ListView id:pageList which is the initialItem of the StackView id:stackView.There is a Function which defines the point ...
0
votes
2
answers
259
views
ExpandedClientAreaHint causes navigation and status bar icons to disappear on Android using Qt 6.9.0
I use Qt 6.9.0 and Android build with QML application.
If I try to use Qt.ExpandedClientAreaHint window flag - application window is fullscreen.
But in case of:
change of screen orientation
or ...
0
votes
0
answers
43
views
In QML, the column width of TabelView cannot adapt to the window width
I attempted to display a table in the window. My table has a total of 4 columns. I hope the column width of the table can be more adaptive to the width of my window (the window width will change), ...
0
votes
0
answers
64
views
The UI file error when I export .ui.qml to .py file
I see the answer that show the process to convert a .ui.qml file from Qt Design Studio to a .py file involves several steps(text)
But I get misstake in the step of save the .qml file as .ui in Qt ...