5 ms·
How lightweight can a desktop environment based on QT be? I thought QT is a rather hefty dependency.
by lxe 5y ago
How lightweight can a desktop environment based on QT be? I thought QT is a rather hefty dependency.
- nuerow 5y ago> How lightweight can a desktop environment based on QT be? I thought QT is a rather hefty dependency. Hefty when compared to what? In a world of webview-based apps, Qt is extraordinarily lean.
- MaxBarraclough 5y agoI believe the FLTK and FOX toolkits are generally quite a bit lighter. No doubt Qt has them both beat on convenience and features, but still, there are lighter toolkits out there.
- kevin_thibedeau 5y agoNative Xlib.
- formerly_proven 5y agoxlib is not a toolkit.
- jcelerier 5y agohow many GUI toolkits do you know that work on an STM32 uc ? because Qt does. https://resources.qt.io/videos/programming-for-smart-devices-microcontrollers-with-stm32-series-and-qt https://resources.qt.io/videos/programming-for-smart-devices... I think that's there's a huge problem with Qt's installer where I've seen a lot of people blindly checking all the boxes and installing things they'll never need like 6 different windows ABIs, the android version and whatnot which will install literally gigabytes of stuff and lead to a bloated perception (I teach students to make UIs with Qt every year and every year even if I warn them beforehand, they used to still fall into that trap... nowadays I just tell them to use aqt which will just install exactly what is needed). A build of Qt on desktop machines for the needs of LXQT (basically, QtCore, QtGui, QtWidgets) can be in the ~15-20 megabytes ballpark.
- stagger87 5y agoLightweight is relative. I ship ~20MB of Qt DLLs with my desktop application.
- Rochus 5y agoWell, you can statically link and just include the functions actually in use; here is an example of a Win32 Qt GUI application with only 6.8 MB: http://software.rochus-keller.ch/CrossLine_win32.zip http://software.rochus-keller.ch/CrossLine_win32.zip (just download, unzip and run; works also well with Wine)
- ahartmetz 5y agoInteresting. Usually, statically linking Qt doesn't do much for disk usage because signals and slots cause symbols to be "theoretically reachable" because the linker can't know which strings you are going to pass to QObject::connect() at runtime. More technically, otherwise unused symbols are reachable through the meta-object data tables.
- simion314 5y agoQt is not big and is well architected, so you should not have issues with a Qt based DE but you could stop useless services to get more performance. Qt will not eat your CPU or RAM but if you have a very old device you probably want to use some OS designed for that type of hardware or use KDE3
- inetknght 5y ago> Qt is not big and is well architected I've used Qt in the past and current. Qt is big and, while it might be sufficiently architected, I wouldn't describe it as well architected. There's a lot of Qt-isms that don't follow modern C++ paradigms. The concept of shallow- and deep- copy is particularly frustrating, everything that's based in QObject can't be moved, and a lot of the objects simply _aren't_ extensible enough. Qt's QNetworkAccessManager is probably one of the least-acceptable (or extensible) network access libraries; good luck adding support for custom types of proxies or schemes.
- simion314 5y agoWhat do you mean is big? How much % of your RAM will a Qt application take? What I mean by well architected is that: 1 it respects the user choice so it tries to use the user themes, icons , fonts (it would do a even better job if Miscrosoft and Apple would contribute a bit when they change their designs) 2 it is efficient, it does not use some hacky stuff like you see in angular or react, where one click causes some data to change then a lot of code runs and check what changed where, then try see what other data needs to change then finally updates the DOM, which DOM is a super complex piece of software that is super easy to eat a lot of CPU with just a line of CSS or cause a lot of recalculations when you update one item. 3 Qt gives you a lot of widgets to build on top of, I remember it had a lot of APIs not only for GUI but also networking, desktop integration(like to use the native notifications) 4 I loved the fact Qt had it's own standard library, I know some c++ purists won't like that and the qmake , but we need to understand how many platforms Qt targeted and that the col new C++ features were not there on all this platforms when Qt4 was created (and even with Qt4 I think there was a way to upgrade from Qt3 so there was not a complete start from scratch). I assume there are some smaller toolkits, there are some posted here but I think the smaller ones have only 20% of the features. IMO the reason Qt is not used as much is because it uses C++ , for modern application I think developers prefer garbage collected languages and Qt (last time I checked) did not had mature bindings for this popular languages. Sorry for the long comment, what would you use today if you need to make an application for someone, something simple like some buttons, menus and it does a bit of work maybe with some files or the internet), the goal is to be fast and have very few bugs that you will have to support by fixing them.
- IshKebab 5y agoQt is quite lightweight. Similar to GTK. Less lightweight than something like FLTK of course, but way better than Java or Web based GUIs. It won't be an issue unless you are running on an absolute potato.
- rob_c 5y agoI don't think it relies on the full QT stack. QT used to support more minimal builds i thought i.e. without some WebKit extensions and such but yes full fat QT is a bit on the bloaty side :)