86,399 questions
0
votes
0
answers
25
views
Using stackview with qrc
I have an issue:
qrc:/qt/qml/MyApp/qml/MyApp/Main.qml:11:5: QML StackView: initialItem: qrc:/qml/pages/LoginPage.qml:-1 No such file or directory
File tree
Im strugling to see why it cannot find my ...
Advice
0
votes
2
replies
53
views
Building Qt6 with proprietary codecs for QtWebEngine
If you're a hobbyist programmer like me, perhaps you have had need to build Qt6 from source so that you can include the proprietary codecs needed to play audio and video from web pages loaded through ...
2
votes
0
answers
102
views
QSqlQuery in Qt6: in-place vs prepared
First of all, Qt version is 6.10.0, testing on Arch Linux rolling. I think I've found a bug in Qt but maybe it's just my fault.
My program asks MariaDB database for some data and displays it in ...
5
votes
2
answers
113
views
Qt mouseMoveEvent does not work with QColumnView
I have a QColumnView with a QFileSystemModel attached to it, and I am trying to get information on what file is being hovered over in that model view.
I do have mouse tracking enabled, however it ...
1
vote
0
answers
47
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:
**//...
1
vote
0
answers
31
views
Connecting DBus signals to Qt
I already know that there are already a lot of questions abuot connecting signals from DBus to Qt. I've checked all of them and still I can't figure out what I'm doing wrong. I'm writing a simple ...
0
votes
0
answers
25
views
Compiling QT with EGLFS on Raspbian Lite (Trixie) for Pi 4
in the past I was able to compile QT with EGLFS on Raspbian Buster. I don't remember exactly how I did it, but it uses FKMS driver. Back then full KMS was not supported on Pi 4.
I read that these days,...
0
votes
0
answers
72
views
JKQTMathText drawIntoPixmap problem when devicePixelRatio!=1
When using Qt and JKQtMathText to display LaTeX equations in a QLabel, I noticed a strange behaviour in the drawIntoPixmap() method. When the devicePixelRatio is set to one (the default value), the ...
Best practices
1
vote
1
replies
66
views
Issue with TextField and TextInput Keyboard on Android in Qt 6.10.0
when user tap on a TextInput or TextField, the Android keyboard opens, but typing doesn’t insert any characters into the input field. They can only delete existing text, and new text cannot be entered....
4
votes
1
answer
68
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 ...
0
votes
0
answers
42
views
QT Installer Framework: Add virtual components to installation
What I want to achieve:
I have created a custom page right before ComponentSelectionPage. On this page the user have to provide a key for the installation. Depending on provided key the ...
1
vote
0
answers
64
views
OpenCV-Python with PyQt5: Qt platform plugin "xcb" error and cv2.imshow not working on Linux
I'm trying to use OpenCV with PyQt5 on Linux, but encountering Qt compatibility issues. When I install opencv-python, I get Qt platform plugin errors that prevent the application from starting. When I ...
0
votes
0
answers
42
views
How to cross-compile a customized QGroundControl (Qt 6.8.3) for Jetson Nano (ARM64) from Ubuntu x86_64
I have been customizing QGroundControl and have successfully built it for my Ubuntu system (x86_64 architecture) using Qt 6.8.3. I utilized the provided shell scripts and Dockerfiles located in the ...
1
vote
0
answers
59
views
QComboBox popup not visible when placed in an overlay over QVTKOpenGLNativeWidget in fullscreen on Windows
I'm embedding a VTK rendering widget inside a Qt 6 app using QVTKOpenGLNativeWidget.
The window contains a QVTKOpenGLNativeWidget used for 3D rendering, wrapped inside a QFrame.
On top of it, a ...
-1
votes
1
answer
123
views
How to fix resources.qrc not loading images
I'm trying to load images from my resources.qrc but it doesn't seem to work. For instance:
cardVN1->setImage("://vn1.jpg");// The set image function is user-defined passing a QString
...
0
votes
0
answers
42
views
Halcon Roi drawing mode cant be terminated
when i try to use halcon api drawing roi in qt,i must use left click to end drawing.If i directly close the viewer of drawing roi,the whole program gonna be forzened,cause the drawing isnt ended.I ...
1
vote
3
answers
141
views
Pass QString in Lambda Function
I want to pass a QString into a lambda slot-function to modify it further. Unfortunately the QString goes out of scope before reaching the slot, so I cannot append text. How can I ensure that the ...
1
vote
0
answers
44
views
Extra "pyside" and "qt" in SRC_URI
I'm getting some strange behavior in my Yocto build of PySide6. I've cloned the meta-qt6 layer (release 6.8) and I want to install PySide6. I found that I was getting a bunch of do_fetch errors ...
Advice
0
votes
3
replies
147
views
How do I draw a line using triangles in OpenGL?
In my code, I useing draw line to draw model selection line and error edge line ,useing draw triangle to draw 3D model.
Using the model's openmesh handle, edges are recorded and drawn.
...
0
votes
0
answers
91
views
How do I use Openssl 3 with Qt 5.15.19?
I have an application that still uses Openssl 1.1.1w. I need to update that to an OpenSsl 3 version. Switching to Qt6 seems like the best way to do that, however due to the nature of the codebase we ...
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 "...
0
votes
0
answers
81
views
Problem running and testing the application in squish
I have recently started using Squish for an application I made with Qt.
After installing it I was able to run some tests on the application, but now I am getting an error as shown below:
The Runner/...
1
vote
0
answers
116
views
What makes QGuiApplication construction hang in this case?
Here's a piece of Qt code:
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QGuiApplication app2(argc, argv);
The first constructor call returns, the second does not.
I ...
1
vote
0
answers
48
views
QPalette.ColorRole.ButtonText not updating on hover and checked [duplicate]
In my paintEvent for QPushButton I am getting the current text color, whether the button is disabled, hovered, checked, or static. This works for disabled but when the button is hovered or checked, it'...
0
votes
0
answers
108
views
Why does Qt::AutoConnection fail between threads to pass a QMap object but not for QString?
Using Qt 5 (specifically 5.15.18, but I doubt that matters).
I'm getting a run-time type not registered error when connecting between threads, but only when the connection is Qt::AutoConnection AND ...
1
vote
1
answer
117
views
How to remove the black line style from QDockWidget? [duplicate]
I have integrated QDockWidget windows in QMainWindow, but there is a thin black line (only 1px) under the TabBar. This line appears to be the color of the background. However, I have tried modifying ...
Best practices
1
vote
6
replies
225
views
Base class and derived classes in Qt
I'm building a Qt wrapper for RtMidi. As starting point I created two separate classes QMidiOut and QMidiIn that wrap RtMidiOut and RtMidiIn.
I don't want to duplicate code for the common methods (e.g....
0
votes
0
answers
48
views
Gstreamer Qt6 Mutlimedia Video stops 3 secs before end
I am working with Qt 6.8 (QtWidgets) on an embedded Linux/Yocto device. I want to play a video in my application. It should be possible to play, pause, seek 5 sec forward, seek 5 sec backward and load ...
0
votes
0
answers
46
views
QtActivity onNewIntent blocks Qt signal
I have an Android-app written with Qt 5 where I can read NFC-chips. Additionaly I am using some native Java functionality for updating (installing .apk) my application via Javas native ...
0
votes
0
answers
84
views
Qt 5.15 => 6.10: QML with WebView in the widget app shows empty field instead of web page on Android
I'm developing a mobile app for Android using widgets. One of my app's forms needs to display a web page. I'm using QML with WebView for this (QQuickWidget on the form widget, which displays a QML ...
2
votes
0
answers
66
views
Qt's MOC can not find headers under include/projname [duplicate]
This question is not a duplicate of undefined reference to `vtable for MainWindow'. As I have mentioned in the following I know how to solve the compile error but my question is how to solve the ...
1
vote
0
answers
63
views
Why does my PySide6 DBUS ScreenSaver Signal-Listener not work?
I am currently trying to connect to the Screensaver Signal (org.freedesktop.ScreenSaver - /ScreenSaver - ActiveChanged(bool)) that is emitted when the Screen-Saver is closed:
$ dbus-monitor "...
1
vote
1
answer
143
views
When creating a static const QString, should I use QStringLiteral?
When using Qt 5 and 6.
The intent of QStringLiteral is to (effectively) place the QString object into read-only data space and avoid initialization overhead during startup (as described here).
If I ...
0
votes
0
answers
100
views
Unsubscribe from topic not working when using persistent session Mqtt
I have a Qt application that uses the qtmqtt module to implement a simple MQTT setup.
I’m running two instances — one as a subscriber and one as a publisher.
In the app, users can right-click on any ...
0
votes
1
answer
107
views
MQTT subscriber doesn’t receive queued messages when publisher uses QoS 0?
I’ve been reading the MQTT documentation, and as I understand it, there are two types of Quality of Service (QoS) levels involved:
Publisher QoS: determines the delivery guarantee between the ...
0
votes
0
answers
115
views
How to move the title section of a UI window off screen using QT?
I am building my app with QT5.9 on Linux. I do not want Xserver to add a fixed style system title to my dialog like below (title underlined in red below),
Because of this, I wrote my own Dialog Class,...
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 ...
2
votes
1
answer
94
views
Trying to spread characters across bits in a QImage (Stegonography)
I'm trying to hide UTF8 text inside RGB channels, inside a QImage, by splitting each byte into 4 bytes, into two unsigned integers, repeating until the end of the message, much like this layout:
...
0
votes
0
answers
109
views
C++ QT: How to cross compile QT5/6 CMake project?
I am trying to cross compile a QT project, that utilises CMake from from linux. From this thread I found out about MXE. I compiled the following packages:
qtbase
qt6
qt5
However running <mxe root&...
5
votes
2
answers
158
views
Assign variable with reference
I have a QList of a struct type and made a search-function to find a specific object of my struct by an id-property (QUuid or GUID).
QList<MyStruct> m_items;
bool MyClass::findById(QUuid id, ...
3
votes
1
answer
215
views
Deleting nullptr before creating the object in Qt code
I'm exploring OpenGL with Qt6, and I came across some of their examples. The thing that draws my attention from a C++ perspective is the following piece of code.
delete m_program; // <-- is this ...
2
votes
0
answers
131
views
C++/Qt: QODBC always ignores first row
I am doing an app for a client and he wants to read data from .xlsx, .csv and .xls.
For CSV files, I have already created a data parser, and for XLSX files, I had used QXlsx.
With large files (>1M ...
2
votes
1
answer
87
views
Building Qt6 WebAssembly GUI with Emscripten fails because of missing GLESv2/EGL
I am trying to build a Qt6 GUI project for WebAssembly using Emscripten.
I managed to build the project successfully with nlohmann_json and spdlog.
Now I also want to add the cpr library to use an ...
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 ...