3 ms·
I developed a new database management system and I needed a GUI application to use as an admin tool for it. I decided to build it using Qt (Qt Widgets in c++)
by didgetmaster 9mo ago
I developed a new database management system and I needed a GUI application to use as an admin tool for it.
I decided to build it using Qt (Qt Widgets in c++) mainly because my whole data engine is also in c++. Since it just uses standard windows and dialog boxes; I haven't felt the need to keep up with the latest Qt version. I am still using Qt 5 (I think revision 13 or 15).
I have been contemplating moving to Qt 6. Have users noticed a big difference (e.g. performance) between Qt 5 and Qt 6?
- scrivanodev 9mo agoThere shouldn't be any noticeable performance difference between Qt 5 and Qt 6, unless you're using QML.
- hermitcrab 9mo agoI have products using both Qt 5 and Qt 6. Qt 6 seems better at coping with high resolutions screens, but I haven't noticed a lot of other differences.
- rubymamis 9mo agoQML isn't slower than Qt QWidgets, in the end of the day Qt Quick components are simply C++ objects, you can look at the source code[1]. [1] https://github.com/qt/qtdeclarative https://github.com/qt/qtdeclarative
- noodletheworld 9mo agoHum… QtQuick uses a different runtime which is (afaik) faster and targets modern graphics backends (eg. Vulcan) in a way widgets does not. It also uses an a javascript scripting engine. Saying “they’re both c++” is seems kind of misleading and meaningless right? It’s probably more accurate to say QML is actively being worked on and receiving performance enhancements and updates and widgets is not, and has not for some time. So yes, it’s actually pretty unlikely that QML would be slower (depending on what you do with your scripts) but it’s probably not as clear cut as you are suggesting. QML apps that heavily implement core logic in javascript would be slow as balls.
- rubymamis 9mo ago> Saying “they’re both c++” is seems kind of misleading and meaningless right? Not really, if you avoid writing Javascript code in your QML components, than most of your executable will end up being compiled C++ code. If you do write Javascript code in your QML components, than it *could also* be compiled to C++ code using the QML script compiler[1[2]. > QML apps that heavily implement core logic in javascript would be slow as balls. The entire point is to separate logic and view where logic is written in C++ and QML simply represents the view (which almost end up being built upon simple primitives that *are* C++ objects). So if you keep this separation you get amazing performance with great simplicity and velocity. [1] https://doc.qt.io/qt-6/qtqml-qtquick-compiler-tech.html https://doc.qt.io/qt-6/qtqml-qtquick-compiler-tech.html [2] https://doc.qt.io/qt-6/qtqml-qml-script-compiler.html https://doc.qt.io/qt-6/qtqml-qml-script-compiler.html
- noodletheworld 9mo ago> than it could also be compiled to C++ People who are going to use it should read the documentation. “It depends” and “it’s still slow” are the fairest comments I can make about this.
- rubymamis 9mo agoI already showed in my benchmarks that my block editor is faster than all block editors on the market - even more than those that uses native frameworks. And there are ten of thousand of lines of QML code (and round the same of C++ as well). You can't claim something is slow without showing empiric data. I showed mine when I claimed programming Qt C++ and QML together is fast. If you claim otherwise, you need to support it with data.
- asyncze 9mo ago[dead]
- ahartmetz 9mo agoIf you ever run into trouble with execution of JS slowing down your Qt/QML application, you are using way too much JS. The most common performance issues in decently written applications are rendering of invisible items aka overdraw (especially on very weak embedded SoC GPUs) and slow startup time. There is tooling to find these and ways to fix or improve them.