Live data from Hacker News

Technical Vision for Qt 6

blog.qt.io

121–130 of 184 posts

Re: Technical Vision for Qt 6

#121
These changes are very welcome, but in my opinion are too little too late. Qt has missed the boat with the current developer mindset. While I want Qt to 'win', as the end result is superior to say an electron app, most developers are willing to sacrifice usability and add bloat by using electron. Or simply paint them selves into a corner with a native SDK.

Qt has a massive uphill battle to try and stay relevant. Like it or not, there's a reason why electron apps and native ui sdks become the zeitgeist. While reusability is often cited as the main reason why electron has become the cross platform defacto, there's a lot more to it than that.

Personally, the difference between using electron and Qt is black and white. Looking at setting up alone, With Qt you have to struggle to compile a massive library which inevitably won't work. After sinking hours into compiling it, you're confronted with a unknown markup language and toolchain just to get a window displaying. And the documentation is incomplete, and to top it all off the minor versioning differences will cause your app to break in spectacular ways. Compare this to electron, where everything just works out the box, and with npm you have every single library you could ever think of. Microsoft and Apple roll out the red carpet for developers to make ui development super easy, so making two apps with a shared library is often just as tempting.

The way I'd try and save qt would be to make a react-native binding a first class citizen and ditch QML/js engines. I'd also remove the custom tool chains and release extensions for VSCode/Atom that outputted jsx that could get interoperated by a virtual dom. developers would kill for that.

Re: Technical Vision for Qt 6

#122
post #109

Earlier quoted context omitted.

Who is „everyone else“? GTK‘s primary API is C, Apple‘s is Objective C or Swift, none of them are „C++ plus managed language“, only SwiftUI is „layout DSL“ and it isn’t even released yet. So for targeting X11/Wayland or Windows, you can bet 100% on C++, only Apple platforms do not offer native C++.

Metal is written in C++. Try to display graphics in Objective C or Swift without Metal, going further. Which UNIX OS SDK uses a C++ GUI full stack? One could argue for Kubuntu or SuSE, maybe, except KDE isn't tied to a specific OS and then again it uses Qt alongside QML since Plasma, so no pure C++ stack here. And since you missed to fully read my comment, here it is again: > Microsoft is the only consumer OS vendor…

The KDE desktop shell is QML + C++. The vast majority of KDE applications are QWidgets + C++ without QML.

I like QML but it's not that great for many / most desktop applications. It works better for creating fully custom touch UIs from scratch. The plan for Qt 6 mentions a styling API which is one of the most important missing pieces, and discussion in the comments maybe indicates more ready to use controls.

Re: Technical Vision for Qt 6

#124
post #118
post #70

Earlier quoted context omitted.

Are you kidding me, bazel is written in Java...

so what? Bazel spawns a server, the next invocation is really fast.

You’re not helping your case! Spawning a server (a JVM-based one at that!) to be able to get reasonably performant builds is horrifying!

As a simple example, I hack on a Qt app on a Raspberry Pi (it has a tiny display on it and I run a dashboard). It’s only got 512MB of RAM and spinning up a JVM server to run my builds will likely cause it to run out of RAM. I’m not the world’s biggest fan of CMake, but it sure solves a lot of problems while being quite lightweight. And I’ll take it over qmake, mostly because I know CMake well enough and haven’t ever really gotten into the guts of qmake. CMake is more general purpose.

Re: Technical Vision for Qt 6

#125
post #120

Earlier quoted context omitted.

I would love this! In fact the QML format would not even be a terrible way to write non-UI applications, I'd think. Something like MySqlDataBase { id: default_db host: ... } UserController { items_per_page: 20 formatter: UserFormatter {} repository: Repository { table: "users" database: default_db } } is definitely more easier to follow than the linear version auto default_db = std::make_shared ("..."); auto userform…

Been there, done that, SQL queries in JSP. Trust me, you don’t want your business and data access layers mixed with your presentation

That's not what they're suggesting though. The suggestion is to be able to implement business / data access layers in the same style/language that people are implementing their presentation. That the two would be intermixed could certainly be an intended consequence / anti pattern, but I don't think it's inevitable.

Re: Technical Vision for Qt 6

#126
post #121

These changes are very welcome, but in my opinion are too little too late. Qt has missed the boat with the current developer mindset. While I want Qt to 'win', as the end result is superior to say an electron app, most developers are willing to sacrifice usability and add bloat by using electron. Or simply paint them selves into a corner with a native SDK. Qt has a massive uphill battle to try and stay relevant. Like…

I respect your comment, but I think it's a narrow look at what Qt is and what it's used for.

You mentioned "native UI SDKs" having become preferrable, but keep in mind that in many scenarios, Qt is the native UI.

On desktop Linux there isn't a lower level toolkit Qt is translating to, but also in the many embedded products Qt is used on: Car and aviation infotainment (a prominent example is Mercedes-Benz' MBUX OS, but there's literally dozens of these built on Qt and shipping), medical equipment, industrial machines (e.g. the entire HMI sector), kiosk systems, coffee makers, ... Qt is an excellent choice for these, often the only one, and the web stack is very unattractive there due to performance/hardware overhead, quality, security, etc. They're product use cases in industry, with a lot of available very high-paying jobs.

And it's worth keeping in mind that the use cases I cited above by and large pay better than making desktop software does today, unless you're an entrenched player like Autodesk (which uses Qt doe many of its apps). In the only "this pays for a decently sized staff of engineers" desktop app products that are new that I can think of, Qt is also still doing well - say, Pix4D's apps for drone mapping/photogrammetry - because they likewise solve hard problems where you don't want to deal with the web API abstraction/quality barrier and performance overhead.

My bottom line here is: Right now, and very likely ten years from now, if you are good at at Qt you're probably going to work in a very good and stable job at a solid business. I don't see this being the case for Electron developers, and I know where I'd rather be.

As for making desktop apps, if your experience is "Looking at setting up alone, With Qt you have to struggle to compile a massive library which inevitably won't work" it shouldn't be ignored and the developer experience should be improved - tooling, build system and getting modules to devs are all mentioned in this blog. However, I have to say this has never been my experience - between Qt being packaged in Linux distros and the SDK installer on other platforms it's never been hard to set up Qt for me.

Re: Technical Vision for Qt 6

#127
post #43

I'm looking forward to doing a comparison of Qt 6 and Electron in terms of both usability and performance.

Easy just watch React Native for Windows talk at Microsoft BUILD 2019. Electron has 700% performance lost over UWP/C++, which is the baseline. Expect similar results when comparing against Qt.

So, RN can be used as an Electron replacement?

Re: Technical Vision for Qt 6

#128
I'm converting a 500KLOC C++ consumer app from Win32 to Qt so it can also run on macOS. All the app-specific code remains the same. I'm very pleased with how easy it is to design dialogs. Qt is better than anything Microsoft has to offer; what would entice me to forego portability?

Re: Technical Vision for Qt 6

#129

I have given up on Qt since it doesn't work efficiently with X11. GTK works OK though.

Eh? X11 is probably Qt's best target, and it's one of the most popular toolkits for building X11 applications. What made you think it wasn't efficient?

Re: Technical Vision for Qt 6

#130
post #126
post #121

These changes are very welcome, but in my opinion are too little too late. Qt has missed the boat with the current developer mindset. While I want Qt to 'win', as the end result is superior to say an electron app, most developers are willing to sacrifice usability and add bloat by using electron. Or simply paint them selves into a corner with a native SDK. Qt has a massive uphill battle to try and stay relevant. Like…

I respect your comment, but I think it's a narrow look at what Qt is and what it's used for. You mentioned "native UI SDKs" having become preferrable, but keep in mind that in many scenarios, Qt is the native UI. On desktop Linux there isn't a lower level toolkit Qt is translating to, but also in the many embedded products Qt is used on: Car and aviation infotainment (a prominent example is Mercedes-Benz' MBUX OS, bu…

The article itself lists portability as their most important selling point.
Post reply on HN