86,397 questions
1
vote
2
answers
1k
views
SHIFT-JIS ascii support
I want a clarification about SHIFT-JIS characters set. Is ASCII a subset of SHIFT-JIS character set similar to UTF-8. If a file has mix of SHIFT-JIS and ASCII. how can we read the same using QT ...
1
vote
1
answer
73
views
Show Test Results of QtTest in Jenkins
I have Qt 5.12.12 and Jenkins 2.440.1 on Windows.
In my Jenkinsfile I have:
stage('Test') {
steps {
echo 'Testing...'
bat 'mingw32-make -f Makefile check'
...
2
votes
1
answer
11k
views
How can I draw an image on a widget with Qt? [closed]
I want to draw an image on a widget. I have no issue with drawing a pie or rectangle but I can't find anything on images.
My code:
void GraphicWidget::paintEvent(QPaintEvent * /* event */)
{
QPainter ...
86
votes
26
answers
242k
views
"qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found."
I'm using Ubuntu 20.04 via Oracle VM Virtual Box and I faced exactly the same error as all other people.
After building Qt6 source code using official Qt manual, I'm trying to run different projects ...
-3
votes
1
answer
97
views
Building the Qt 6.9.2 project on Ubuntu 24.04 [closed]
I ran into a problem when building my application for the portable version. I wrote a script to automate the build:
#!/bin/bash
set -e
# ==============================================
APP_NAME="...
Best practices
1
vote
1
replies
52
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....
2
votes
2
answers
2k
views
How to display a QWebEngineView in Qt mainwindow?
My webview function with the following code in my main.cpp :
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
...
1
vote
1
answer
13k
views
'QML Connections: Cannot assign to non-existent Property' despite the opposite being true
So, I checked the following questions, which seemed most similar to my existing problem:
QML: Using cpp signal in QML always results in "Cannot assign to non-existent property"
...
3
votes
1
answer
2k
views
Link CorePrivate from Qt6
I am writing a server using QtHttpServer (from Qt6). It's time to implement chats for the system using web sockets, but it hasn't been added to Qt6 yet. I see two ways out – either use long-pulling ...
0
votes
0
answers
36
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
61
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 ...
1
vote
0
answers
56
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
3k
views
module PySide6 not found
I'm currently working with the PySide6 module.(vscode) But for some reason it doesn't work anymore,it worked before but it doesn't now. When I try to run my project this is the error I get:
...
2
votes
1
answer
14k
views
Setting compiler right for meson
I am trying to build a basic Qt Application with the Meson Build System on my Mac (using macOS Sierra), following the tutorial on http://mesonbuild.com/samples.html.
My meson.build file looks like ...
16
votes
6
answers
17k
views
Clickable hyperlink in QTextEdit
I want to use QTextEdit (in read-only mode) to show a clickable hyperlink, I used to do
QTextEdit *textEdit = new QTextEdit;
QTextCursor cursor(textEdit->document());
textEdit->setTextCursor(...
-1
votes
1
answer
2k
views
Calculating distance and speed using gps coordinates using qt c++
I am attempting to convert the first code snippet at:
Calculate distance between 2 GPS coordinates
// var R = 6371; // km
// var dLat = (lat2-lat1).toRad();
// var dLon = (lon2-lon1)....
31
votes
4
answers
25k
views
How to solve Qt Creators variable-"<not accessible>" behavior?
I have the same problem as described in Variables in Locals and Expressions not accessible in QT Creator but I want to find a way how to "repair" Qt Creator showing default composite types like std::...
Best practices
1
vote
6
replies
219
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....
6
votes
2
answers
12k
views
Gradlew throws java.net.SocketException
So I created a Qt project for Android, but whenever I try to build it I get that exception. I even tried to run the gradlew file in the command line with the same results. Wherever I look online it ...
1
vote
2
answers
4k
views
QMap values as structs
Let's say we have this sample:
struct test
{
QString name;
int count = 0;
};
QMap<QString,test> map;
test test1;
test1.name = "doc1";
map.insertMulti("pen",test1);
test test2;
test2....
4
votes
1
answer
121
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 "...
1
vote
1
answer
113
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 ...
2
votes
4
answers
599
views
Single Document Interface for Qt Creator on Mac
On Qt Creator, is there a way separate projects can be made to open in separate windows?
The visual separation of the source code files would make comparison / copying much easier.
EDIT: From ...
1
vote
0
answers
110
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'...