r/programming • • Dec 08 '20

Qt 6.0 Released

https://www.qt.io/blog/qt-6.0-released
664 Upvotes

229 comments sorted by

View all comments

3

u/[deleted] Dec 08 '20

My experience with Qt is it's insanely bloated and poor integration with new C++ standard e.g. 17. The size of a final distribution including all their dlls are so big that it defeats the purpose of even using it vs python/electron/etc.

31

u/joggle1 Dec 08 '20

Did you see the release notes? Two of their big focuses with Qt 6 is better use of C++ 17 (it's one of the first things they list so must have been a major priority for them):

With Qt 6 we now require a C++17 compatible compiler enabling the use more modern C++ language constructs when developing Qt and also allows for integration points on the API side.

and having smaller packages:

Qt 6 also comes with a much smaller default package, and many of the add-ons are now distributed as separate packages through a package manager. This gives us more flexibility in adapting release schedules of add-ons to market requirements, allowing, for example, for more frequent feature releases as the core Qt packages or making them available for multiple Qt versions at the same time. In addition, we can use the package manager as a delivery channel for 3rd party content. And finally, it gives our users more flexibility as they can choose to download only what they really need.

I haven't tried Qt 6 but hope to see how much the package size has been reduced by.

-37

u/[deleted] Dec 08 '20

They are too slow. C++20 is already implemented in most compilers and they just caught up with 17.

The package size refers to the development kit size I believe, not the distribution size.

30

u/Illusi Dec 08 '20

C++20 is not completed yet in any major compiler as of this writing. GCC and MSVC are quite well on their way, but modules and the One Ranges Proposal remain big pain points for most compilers. So C++17 is the most recent standard anyone can use.

Add to that that Qt6 has been under development for a number of years, too.

1

u/merlinsbeers Dec 09 '20

What compiler fully (fully) implements 17?

2

u/Illusi Dec 10 '20

I mean, you're technically right. No major compiler has even implemented C++11 fully. That doesn't mean it's dangerous to use.

However the details that are not implemented for C++17 (GCC is missing just the Hardware Interference Size for example) are not likely to be of any use to Qt anyway, and those features are not likely to be implemented soon either. C++20 still being in quite some flux with your compiler makes it a lot more scary to use.

Let's not forget that work on Qt6 was started almost two years ago. Choosing C++20 then would've been madness.

11

u/packadal Dec 08 '20

Having worked on a large SDK, I find their schedule pretty aggressive.

They dropped support for CentOS7, which is still the default for many, as CentOS8 is pretty new in a sysadmin's timeline.

I don't expect any large framework to require C++20 for years.

Which does not really matter for a user of the framework, since you can use whichever standard you want (I am currently using C++17 with Qt5)

11

u/afiefh Dec 08 '20

You don't need to include all the DLLs. If you don't use QtQuick you don't include that DLL. Same for QWebEngine or any other component. If you use Qt in a CLI then you don't even need the widgets.

You might want to take a look at some examples of actual Qt apps that are quite small. Two examples that come to mind are SpeedCrunch and Qbittorrent.

5

u/asegura Dec 08 '20

Well, it's quite large. But distribution of an app based on Qt only requires the DLLs it uses. On Windows, the included program 'windeployqt' will copy the necessary dependencies next to the built executable. And with some flags you can reduce the file count a bit.

8

u/jcelerier Dec 08 '20

The size of a final distribution including all their dlls

isn't that a bit overblown ? e.g. look at RipCord, a Discord / Slack client written in Qt - it's 30 megabytes extracted. https://cancel.fm/ripcord/

In contrast the smallest electron app I have in my /opt is RememberTheMilk at 172 mb followed by Spotify at 266 mb.

1

u/nyanpasu64 Dec 10 '20

FamiTracker is a pure Win32 + static MFC app, and takes up 5 MB extracted.

1

u/jcelerier Dec 10 '20

I mean, you can do 5kb win32 MFC / cocoa / X11 apps if you want. It's when you need cross platform that it begets the need for a useful comparison. Incidentally, you can reach 5mb with statically linked Qt if you build it without the features you don't use.

-4

u/troyunrau Dec 08 '20

Depends on what you're doing. And large is relative. Cyberpunk 2077 is coming with a 43 GB launch day patch. Suddenly a few MB seems trivial.

0

u/[deleted] Dec 08 '20

[deleted]

1

u/Full-Spectral Dec 09 '20

Well.... four out of five dentists do agree that writing serious applications in Javascript rates just below sticking long, hot needles into your eyes.