Page 1 of 1

QT5 Information

Posted: Thursday 24th November 2022 6:20am
by thatbruce
This is more "specialized" than the "DidYouKnow" thread and is intended for those who have particular interest in getting the most out of the gb.gui.qt/gb.gui.qt5 components.

1) Getting your executable projects to work with your local qt5ct configuration
This one has been irritating me for months. I finally found out that you need to have QT_QPA_PLATFORMTHEME=qt5ct in your environment. This should be able to be set in your ~/"bash things" or you can start your program with "env QT_QPA_PLATFORMTHEME=qt5ct <path to your project .gambas".

2) Getting the IDE to start your project with your local qt5ct configuration
To do this you need to set the Debug configuration Environment items to include the same thing as in this diagram.
Selection_016.png
Selection_016.png (25.47 KiB) Viewed 578 times
3) Getting rid of annoying QT error messages in your console output
Sick of those "blah blah qt_qpa_blah blah blah" error messages in your output? Then
another handy little thing to add to your environment and in the IDE Debug Configuration is QT_LOGGING_RULES=*.debug=false,qt_qpa*=false.
(I have suggested to Benoit that that one should be added to the IDE.)

Re: QT5 Information

Posted: Thursday 24th November 2022 6:30am
by thatbruce
Sorry, my bad.
That last one should be QT_LOGGING_RULES=*.debug=false;*.qpa.*=false.
It gets rid of annoying gaff like "qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1421, resource id: 23759460, major code: 40 (TranslateCoords), minor code: 0"