6 ms·
Just curious. Why not go for QT for the whole GUI on all platforms?
by JupiterMoon 11y ago
Just curious. Why not go for QT for the whole GUI on all platforms?
- cwyers 11y agoBecause native GUI on Windows and OSX is better for those users and already exists?
- JupiterMoon 11y agoI'm new to GUI programming and foreign to both Windows and OSX so please forgive my ignorance. In what way are the native GUIs better? Are they faster/more responsive or do they look better? Which would be more work over the e.g. 1,2 and 5 year period maintaining three guis or one? (Or is QT not quite cross platform so one ends up maintaining three inferior versions anyway?)
- jdub 11y agoThey behave exactly the way you'd expect, because they don't attempt to copy the expected behaviour. They define the expected behaviour.
- matt_kantor 11y agoNot in this case. Unity's editor has a very "unique" UI. It doesn't try to follow OS-specific conventions most of the time. https://youtu.be/DEumkKjE2YQ?t=8m15s https://youtu.be/DEumkKjE2YQ?t=8m15s
- JupiterMoon 11y agoUntil your user has your program installed on e.g. mac and windows and now it works differently on each... This is actually an annoying problem. As a linux user lack of consistency between apps is frustrating but similarly I know people that struggle with changing from mac to windows regularly.
- zanny 11y agoQt is cross platform. The difference is that there are UI rendering (say, scaling) behaviors the native toolchains use Qt does not. It comes as close as possible within its widget layout engine it can get away with to native on every platform it supports (which when you consider thats everything from Android to Windows is a feat) but is never a perfect reproduction. Its not something that is going to be "work" for you - you just aren't going to fix it. You get a portable codebase without any of the if WIN else OSX soup, but the experience will never be perfectly native. Though nowadays I don't even know what native Windows means anymore, is it that ribbon crap, or the metro thing? Because Qt apps just use oldschool Windows Forms style menubars / buttons / etc. You can just go test it yourself, go run VLC and see how "native" it feels. Its using Qt everywhere except Android. But if you want to develop cross platform native looking software... Qt is absolutely it. Only option. And it gets better each release. Otherwise you are going the route of the Unity guys, rewriting your program for every single system.
- nzp 11y ago> But if you want to develop cross platform native looking software... Qt is absolutely it. Only option. If you want to develop cross platform native looking software, Qt most certainly is not the only option, wxWidgets is. In fact, as you yourself pointed out, Qt isn't really native, just tries to fake the native look and feel. wxWidgets actually is, as it's a thin wrapper around the native toolkits.
- throwaway24242 11y agoI think native UIs are overrated and just cause headaches for developers. E.g. take the most popular UI system: HTML/CSS/JS: users have no problem with the fact that all their favourite websites look different. IMHO it is a better idea when the application enforces the same UI across platforms (like QT) than the platform expecting the same UI for all programs. On top of that QT does support native look&feel.
- zanny 11y agoTheres a major difference between a website and a native application. I'm used to websites having no consistency and having elements all randomly over the page. I'm only there for a few minutes, after all. A lot of productivity software uses Qt. If it were not using native look and feel it would piss everyone and their grams off when system level keyboard shortcuts didn't work, when menu bars weren't oriented system native, when it didn't use the system file dialog, etc. Integrating with the OS is essential to workflow unless the application literally is your entire workflow.
- rdsnsca 11y agoThe truth is Mac user expect a Ui to look and feel native, otherwise you will be savaged in reviews, no matter how good your feature set. You last sentence tells me you have never used a QT app on a Mac, because it does not look and feel native.
- shaan7 11y agoThere are ones that don't (Quassel for example) and there are ones that do (VLC for one). At the end there is always some polish a developer needs to do, no matter how awesome the toolkit gets. If the developer won't do that, your app will look crap. And its not just OSX, you write your Qt app on Windows and then you run it on Linux, you will need some fine tuning to look perfect. I still prefer it over any other free IRC client for OSX simply because the feature set rocks.
- throwaway24242 11y agoBut do the users care? I do not think so. Otherwise a lot of famous websites would have native UI clients.
- zanny 11y agoThere is some insane technical debt maintaining three versions of your application with platform specific plumbing. It almost never is worth the investment to become portable after the fact, but when you start out it always strikes me as incredibly shortsighted to lock yourself into a native toolkit in the first place when Qt is so good nowadays.
- panic 11y agoYou could also make this argument in the other direction: it's incredibly shortsighted to lock yourself into Qt when there are some things you can do only with a native toolkit. Using native libraries on each platform gives you flexibility and intra-platform consistency at the expense of lots of extra effort. It really just comes down to whether you're willing to expend this effort or not.
- throwaway24242 11y agoWhat are examples that you can just do with a native toolkit?
- panic 11y agoOne example that comes to mind is adding custom force touch events on Apple's new trackpads.
- natosha_bard 11y agoUnity only uses native UI systems for Window management, input handling, and menus/file dialogs. The rest of Unity's UI is intentionally written in Unity's own GUI. We chose GTK over QT for Linux because Unity 5.1 ships with CEF (https://en.wikipedia.org/wiki/Chromium_Embedded_Framework https://en.wikipedia.org/wiki/Chromium_Embedded_Framework) as the embedded browser and CEF already pulls in a dependency on GTK).
- jebblue 11y agoIt seems Gtk has won, why don't the QT developers and supporters move to the Gtk camp and work to make it better rather then keep QT alive which just wastes efforts.
- JupiterMoon 11y agoI'm new to this but I thought that QT is more convenient to use on windows and osx?
- sirtaj 11y agoBecause for professional development, there's really no comparison; Qt is on a different level from GTK entirely. I just did a keyword search on Monster India - Qt: 69 jobs, GTK: 3 jobs.
- htns 11y agoYeah, just about the only reasons to use GTK+ in new projects are the plain C API and slightly better bindings. Qt bindings support deteriorated a little from Qt 4 to Qt 5 (python is there but still no java bindings as far as I can tell), whereas GTK+ isn't expanding in features so it doesn't get to have such problems.
- seba_dos1 11y ago"Gtk has won" [citation needed]
- adrusi 11y agoIt has essentially won on linux, where Qt is limitted to the KDE subculture and cross platform apps for which linux is not a priority. GNOME, Unity, Pantheon, XFCE, LXDE, Mate, Cinnamon, etc. all work best with GTK. With some of the heavier weight desktops, Qt apps look quite out of place, kind of like how cross platform UI apps look on Mac and Windows. Since most Qt apps on linux come from the KDE ecosystem, they often pull in a lot of KDE dependancies, which means a lot of extra packages lying around your system, creating clutter, which might bother some people. The relatively heavyweight nature of most Qt apps makes them less appropriate on systems that use just a window manager rather than a full desktop environment. Sure, a lot of GTK apps pull in a bunch of GNOME dependancies, but there's also a large contingent of GTK apps from the lighter-weight XFCE world that don't. Outside of linux, Qt has won pretty decisively, mostly because the GTK developers aren't interested in making GTK apps look good on Mac/Windows, so long as they run.
- rdsnsca 11y agoProbably because Unity was a Mac first program. The Windows version came when it was 2 or so i think.