Questions tagged [qt6]

For questions specific to version 6 of Qt.

Qt6 was released in late 2020 and features some incompatibilities with the Qt5 release.

See: , , , etc.

Differences from Qt5


References

694 questions
0
votes
1 answer

Qt how to center widget with a maximum width?

How can I horizontally center a widget in Qt, in such a way that it stretches out up to a certain size? I tried the following: QVBoxLayout *layout = new QVBoxLayout(this); QProgressBar *progressBar = new…
Julius
  • 1,155
  • 9
  • 19
0
votes
1 answer

Crash when checking collisions in Qt6

I want to detect all items in collision with a QGraphicsItem (item), yet the code below crashes, id like to know the reason. void PlayerDefences::checkCollisions(QGraphicsItem* item) { QList itemCollidesWithShip =…
black_gay
  • 143
  • 7
0
votes
0 answers

How to use VSCode to debug an application that spawns child processes

I'm developing a C++ application which is going to use multiple child processes, and these child processes must be spawned by the parent process so that pipes can be set up correctly. Currently, my child process is crashing somewhere in startup.…
Tustin2121
  • 2,058
  • 2
  • 25
  • 38
0
votes
1 answer

Transition problem in StackView which is displayed on Dialog

Well, I've run into a problem with my StackView in Dialog. You can see it in this example. Maybe I need to rewrite the animation? Here is my code: Dialog { id: settingDialog anchors.centerIn: parent width: 350 height:…
EEdle
  • 13
  • 4
0
votes
1 answer

Can we run Qt6 examples on Windows 11 vmware?

Can you run Qt6 apps/examples on Windows 11 vmware? I tried some Qt6 examples but it just shows the window without UI. The app/examples can run well with Qt6 on my physical machine. Ex: I tried coffee app in Qt 6.3 on Windows 11 vmware. Thanks,
aviit
  • 1,957
  • 1
  • 27
  • 50
0
votes
1 answer

How to bounce a QWidget around the desktop

I am trying to bounce a QWidget around the screen. This is the code i tried. class Window : public QMainWindow { public: void moveEvent(QMoveEvent* aEvent) override; }; void Window::moveEvent(QMoveEvent* aEvent) { QSizeF screenSize =…
0
votes
1 answer

QML ListView Model setProperty Work only 1 time

I have a ListView filled with checkboxes, I want to change the checkbox status from a button click this is my code. import QtQuick import QtQuick.Controls 2.15 Window { width: 640 height: 480 visible: true title: qsTr("Hello…
user7179690
  • 1,051
  • 3
  • 17
  • 40
0
votes
1 answer

QtQuick: how to connect a tcp client (signal / slot) with the GUI in qml

I'm currently writing my first QtQuick application with GUI in qml code that includes a TCP server. The whole thing is already running quite well and several clients can connect to the server from outside on the defined port. For the server code, I…
0
votes
0 answers

Ugly font when compiled application using Qt 6 in Linux

I compile a simple QT GUI application with Qt 5.15.2 and Qt 6.2.4 in Linux Ubuntu 20.04.4. As you see in the below figure, the font of the application compiled with Qt 6.2.4 (Right Fig) is bigger and uglier than the program compiled with Qt 5.15.2…
Abolfazl Diyanat
  • 397
  • 2
  • 13
0
votes
1 answer

How to QMap()::begin() + int offset

I have function in my filemodel which returns actual file name in specific position. ... QMap fileInfoMap_; ... QString MFileModel::fileAt(int offset) const { return (fileInfoMap_.begin() + offset).key(); } ... Problem is,…
exo
  • 373
  • 5
  • 22
0
votes
0 answers

Accessing KeyNaviagtion from a property alias

Is it possible to use a property alias and gain access to KeyNaviagtion, assign an object to it, such that I can navigate between the buttons: cornerButton, messageButton and callButton? The cornerButton will be used to close the pop up. The code…
test me
  • 47
  • 6
0
votes
0 answers

Fastest way to delete rows in QTableWidget for QT C++

I want to delete rows in QTableWidget between a range. The only problem here is that deleting row by row...takes very long time. Is there a way to make this faster by deleting between a range? I want to delete rows from toRow to fromRow, where toRow…
euraad
  • 2,467
  • 5
  • 30
  • 51
0
votes
1 answer

I can't insert data into my sqlite3 database using qt 6

I have a test.db database on my project directory, which I'm trying to insert data into. The database is connected, but I can't seem to insert data in it. The query is not executed at all (it seems), since the qDebug shows "Bad". QSqlDatabase…
0
votes
1 answer

QClipboard::dataChanged() was not emitted in QtWebEngine context

QClipboard::dataChanged() was not emitted in QtWebEngine context with pyqt6 or pyside6, but it works fine with qt5/pyqt5, how to solve it ? Environment: Python: 3.9.10 (tags/v3.9.10:f2f3f53, Jan 17 2022, 15:14:21) [MSC v.1929 64 bit (AMD64)] Flavor:…
iMath
  • 2,326
  • 2
  • 43
  • 75
0
votes
1 answer

Style a QFrame with CSS depending on the frameShape in Qt 6

Using the Fusion style, both a QFrame with a HLine and VLine frameShape set are displayed as a 1px black line. Up to Qt 5.15, the appearance could be changed with style sheets. E.g. this made such a QFrame a gray line: QApplication application(argc,…
Tobias Leupold
  • 1,512
  • 1
  • 16
  • 41