12,150 questions
0
votes
0
answers
12
views
Horizontal ScrollBar not visible in ScrollView
I want a custom horizontal ScrollBar in ScrollView but for some reasons, it not appearing as well as not functional
import QtQuick
import QtQuick.Controls.Basic
Window {
width: 640
height: ...
0
votes
0
answers
85
views
Phantom white box whilst using Application Window and Windows 11 Mica background on QML, qt 6.10.1
I've been experimenting with applying a Windows 11 Mica background effect to a QML Application using Windows 11 24H2 with Qt 6.10.1.
The mica effect works, but there's a white box in the Application ...
3
votes
1
answer
122
views
Efficiently passing QList from C++ to QML with property bindings and array syntax
Suppose I have a C++ object called MyCppComponent that takes input from QML and outputs an array of QString. The scheme looks like this, first the intended use:
MyCppComponent {
id: ...
2
votes
1
answer
59
views
Surprising mouse behaviour when TableView overlapping
Given this code:
import QtQuick
import Qt.labs.qmlmodels
Window {
width: 640; height: 480; visible: true; color: "silver"
FocusScope {
id: bottomScope
anchors....
0
votes
1
answer
70
views
Buttons of irregular shape in QML
I need to make a collection of buttons of irregular shape -- similar to a puzzle where each piece is a button. They do not overlap, do not necessarily cover the whole window and may have gaps. In ...
1
vote
1
answer
46
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
67
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
85
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
91
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
129
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
99
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
115
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
133
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
56
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
102
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
122
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
101
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
123
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
95
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
131
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
209
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
129
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
60
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
70
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
228
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
137
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
95
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
109
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
98
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
59
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
67
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
189
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
194
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
98
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
81
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
125
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
79
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
64
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
160
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
42
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
82
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
233
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
78
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
205
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 ...