Questions tagged [qt]
Qt is a cross-platform application development framework widely used for the development of application software that can be run on various software and hardware platforms with little or no change in the underlying codebase, while having the power and speed of native applications. Qt is available with both commercial and open source licenses.
86,213
questions
1
vote
0
answers
22
views
Calculating the exact needed height for a QTableWidget (Qt 6 update)
When calculating the height that is needed for a QTableWidget so that all rows are visible and no scroll bar is added, it's not enough to take the number of rows, multiply them by the row height and ...
1
vote
0
answers
15
views
Asynchronous communication between 2 QThreads
I'm working on optimizing a PyQt application (to control tensile testing machine) that's sometimes slow. The application uses two QThreads, both running in a loop with time.sleep inside.
One QThread (...
-4
votes
2
answers
60
views
c++ qt multithreading is called in the main window but has no effect [closed]
I create a new class (MyThread) that derives from QObject.
class MyThread : public QObject{
Q_OBJECT
void work(){ //executing....}
}
I created a child thread in the main thread:
void main(...
0
votes
1
answer
54
views
How do I force a QWidget to be repainted?
Given the following main window implementation:
#include <QApplication>
#include "MainWindow.h"
namespace ui {
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
...
0
votes
1
answer
55
views
QProcess and std::thread - Cannot create children for a parent that is in a different thread
I am getting a run-time message
QObject: Cannot create children for a parent that is in a different thread.
when starting a QProcess in a std::thread. The program runs, but I feel that this message ...
0
votes
1
answer
36
views
Tableview set a image as a icon without showing the path as text
I have a 4 column QtableView that I am filling from a .csv file. The first column cells shows a custom icon from a folder of images and the rest of the columns are text only. Everything works as ...
0
votes
0
answers
56
views
Why is the title bar captured incorrectly after changing the width of a window?
I felt this was related to How can I grab a window with widgets and title bar?, but it seems to have a different solution.
When capturing a (window with a) title bar, I get unexpected results after ...
0
votes
0
answers
29
views
How can I grab a window with widgets and title bar?
I am trying to save a snapshot of a QMainWindow with widgets and title bar.
This is how I tried:
from time import sleep
from PySide6.QtCore import QRect
from PySide6.QtWidgets import QApplication, ...
0
votes
1
answer
44
views
Does Qt use pkg-config
Does Qt use pkg-config?
If not, what is the best way to find where Qt is installed for the Automake & friends project?
My project is based on the Autotools and Makefile is generated by Anjuta.
...
0
votes
0
answers
23
views
Resizing an image selected by the user using values taken from a combobox
In the project, I am trying to take an image from the user using a file directory, resize it with the value selected from the combobox, and show the resized version in the application, but only the ...
0
votes
0
answers
31
views
QQmlOpenMetaObject breaks overloaded method calls
My question is, does it possible to employ QQmlOpenMetaObject in the class and have method overloads of the class methods? I probably somehow used QQmlOpenMetaObject incorrectly or something but there ...
1
vote
1
answer
51
views
Why is this QAbstractItemModel based model not working?
I create a simple QMainWindow app as follows:
The header file:
//mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QAbstractItemModel>
#include <QTreeView>
#include <...
0
votes
0
answers
22
views
Failed to find required Qt component "Qml" [duplicate]
I'm trying to build an application with Qt, using CMake on Linux (Ubuntu 23.04).
For the Qt part, I want to use Qml.
Inside my CMakeLists.txt file, I've got:
find_package(Qt6 REQUIRED COMPONENTS Core ...
0
votes
0
answers
23
views
"make: *** There is no rule to build target "sub-mysql". Stop." error when trying to create a MySQL driver with Qt
I'm trying to install the QMYSQL driver on Ubuntu 24.04 LTS with Qt version 5.15.3, but I'm running into some issues.
Problem:
The sqldrivers directory only contains the SQLite driver, and I'm missing ...
0
votes
1
answer
29
views
How to scale a QML rectangle without also scaling any child text
I have the QML component outlined below. The problem I have is that when I scale the rectangle using a pinch area (which I want to happen), the text that is a child to that rectangle is also scaled (...