5 ms·
I gave up on QT and decided instead to invest time learning javascript frameworks, which provide a lot more flexibility for creating apps.
by dev_dull 8y ago
I gave up on QT and decided instead to invest time learning javascript frameworks, which provide a lot more flexibility for creating apps.
- int_19h 8y agoFlexibility to do what, though? I'm genuinely curious: what doesn't Qt offer that a desktop app might need?
- christophclarke 8y agoI assume learning to build interfaces in Javascript allows you to port that skill to both the desktop environment (via something like Electron) or web environment through a browser.
- dev_dull 8y agoExactly this. Javascript frameworks allow overlap. I'm using the same tools and language to create a UI. Don't get me wrong I like QT apps and still tinker with them periodically. I will probably use them more once Go finds a way to make truly portable UI applications.
- radix07 8y agoI guess that's cool if you mostly do web stuff. But there are tons of developers that use Python/C++ for embedded systems, OS, data science and other things that could make the same argument for Qt.
- simion314 8y agoIf only there would be a standard way of doing GUIs in HTML, but if you give the same GUI to be implemented to 10 Web developers you will get really different code, some would write it in HTML and CSS, other would maybe use angular, others would use react or similar, or if the project uses other backend language/frakework you will get different results depending on what PHP,Ruby,.NET,Java framework was used. In Qt you use the Designer, you need to learn about the layout system if you want to do good UIs, but your GUI is saved in a file and then the c++/python code implements the event handlers and app logic.
- 21 8y agoWhy do you think programmers of all people are heavily migrating to Electron based editors like VS Code? Because they like using slow and bloated apps? And I'm not talking only of web programmers, I know plenty of C++ programmers who moved to VS Code.
- xfer 8y agoBecause VSCode is a good enough program that fits their needs and the alternative that they were using was Visual Studio? How does that say anything about native frameworks?
- int_19h 8y agoBecause C++ is not a particularly good language to write large UI apps in. Also, because QML is still not as good as the rest of Qt. But it's the right approach - a dedicated framework for desktop apps that is not built on things intended for completely different purposes (like HTML), but stealing the good ideas from there, like using a markup language to define the UI tree, and bindings. Really, what we need is a cross-platform WPF with less fat. HTML is not it - it's cross-platform WPF with more fat, and not optimized for UI.
- int_19h 8y agoOh, I appear to have misread your comment as "why developers move to Electron for their apps". The reason why developers, myself included, migrate to VSCode is really simple: because it's the best all-around cross-platform IDE right now for many scenarios, and because it has a thriving extension ecosystem to tailor it further. But it is that in spite of being written in Electron, not because of it. If Microsoft announced that it is being rewritten in Qt tomorrow, I'd be ecstatic. Just to give you an example of what kinds of issues using web tech for desktop-like experience can cause: https://github.com/Microsoft/vscode/issues/22900 https://github.com/Microsoft/vscode/issues/22900 (Yes, I'm well aware that they fixed it. The point is that the offending code needed to be written in the first place. A native desktop app using 13% of the CPU to render a blinking cursor would be considered an insane bug to have in the first place.)
- simion314 8y agoYou can create custom widgets like some fancy buttons in Qt too but the appeal is to not customize things and let the user platform and theme choice to dictate how things look like. Qt had layouts years before html got the flexbox and gridbox too so I don't think there is a feature in html that is missing in Qt, Qt also includes QtWebkit if you ever need say to display some html or run some JS so basically you have access to native libraries and to JS/HTML if you need.
- kbumsik 8y agoThen try QML! You can create Qt apps using JavaScript (it's ES5 though).
- usefulidiot 8y agoES6 in Qt 5.12
- zorkw4rg 8y agoQML is actually pretty awesome, I got into it through KDE/Plasma widget development. I think it should be possible to get newest JS working using Babel in your build pipeline. I think it makes a LOT of sense in cases where you develop a UI and can't effort to embed webkit/chrome.
- nofunsir 8y agoSeconded. I got QML running on my pi using EGL (fullscreen without X) and love it.