7 ms·
Genuine, non-trolling question: why wxWidgets instead of, say QT or GTK? ((Looking into GUI toolkits for a side project, I was thinking about one of the SDL-ba
by BruceEel 6y ago
Genuine, non-trolling question: why wxWidgets instead of, say QT or GTK?
((Looking into GUI toolkits for a side project, I was thinking about one of the SDL-based ones but really unsure now))
- billforsternz 6y agoI made the decision around 2010, when the landscape was a little different. A key but rather random factor was I'd happened to buy a book on wx, just for interests sake. I liked that wx was straightforwardly open source, whereas qt had various licensing issues and complications (still does). Gtk is really in a different category. Wx sits on gtk on Linux for example.
- BruceEel 6y agoInteresting, thank you.
- evilelectron 6y agowxWidgets is a wrapper over the native GUI toolkit. It allows you to write a OS independent GUI code and because it is a wrapper you get most of the benefits of native toolkit like dark mode.
- formerly_proven 6y ago> most of the benefits of native toolkit like dark mode. On which OS does dark mode work with wx? Certainly not with Windows... (which, as VZ points out, isn't wx's fault, it's just that no APIs officially exist for this - explorer.exe has dark mode, but that uses completely private, undocumented APIs).
- VZ 6y agoMaybe this has something to do with the fact that Windows doesn't have dark mode for the desktop applications in the first place.
- Kliment 6y agoNot the person you're asking but here's my take anyway: I use wx for my own stuff and also use a lot of wx-based applications. Wx is quirky and has some bugs but it's not going to go away or have a massive breaking change without warning. Its biggest weakness is the slow release schedule which leaves users waiting for a long time to access things that are critical on changing platforms (macos is a massive pain to support as the underlying system changes all the damn time). My opinion of it can be summarized as "the worst, except for all the others" so I keep using it. I keep considering Qt whenever I start a new project and I'm still scared to use it. It's controlled by a company that is in really bad shape financially and has a history of attempting stupid things for short-term profit and screwing over customers. It's reasonable if you can manage with either just the LGPL components or if your entire project is GPL, but if not their license terms are really terrible and get worse and worse over time. They keep making changes that fuck over their paying customers. I don't feel good about using this at the moment. The KDE people have thankfully got that company by the balls with a watertight contract, and I totally trust the KDE people, but there's still plenty of damage the company can do, and every sign they will. It's really unfortunate because Qt is otherwise an excellent platform. Multiplatform gtk is a pain. There are a few projects that successfully pull it off (Horizon EDA is a notable example) but I don't think I could manage it myself. If you're doing a new thing you might want to consider one of the many imgui implementations (as you seem to be thinking in that direction already).
- BruceEel 6y agoAh indeed, I am one of those painful macOS users.. the carelessness with which the mother company changes and/or breaks API's overnight still boggles my mind. It's funny, I have some experience with Swing, from work, and I kind of like it, API-wise, so I toyed with the idea of JNI'ing my way around it... but it seems such a ridiculous thing to do for a super-simple GUI. Plus missing the chance of actually learning a 'native' (native as in code) GUI toolkit. I remember playing with Qt (many) years ago and making a mental note to get back to it but a 2020 revisit turned into an exercise in frustration, couldn't get it to build anything (very likely to blame on my ageing XCode installation rather than the Qt SDK). But as you point out, licensing issues & overall maker's attitude need to be considered too. The imgui's are quite neat. I like the fact that building one of the demo's (with an impressive array of widgets) sort of 'just worked.' That's impressive, these days!
- ZuLuuuuuu 6y agoOne key difference between wxWidgets and Qt or GTK is that wxWidgets, as far as I know, uses native controls to create the UI, unlike Qt or GTK which draw everything themselves. Qt is really good at imitating a native feeling but wxWidgets provides a real native UX. Having said that, for my Python projects, I am currently using Qt via PySide2 since that one worked without any problems with a simple pip installation while the other 2 gave some errors (I tried them about 2 years ago, maybe they work better now). Another reason I currently use Qt is because I needed to do a lot of drawing and interact with these drawings on a canvas and Qt has QGraphicsView widget which is a really capable canvas widget where you can easily do transformations, interactivity with good performance and it also has a good documentation. GTK didn't have such a widget out of the box, I didn't look at wxWidgets, though, maybe that one has.
- Kelteseth 6y ago> wxWidgets, [...], uses native controls But only the old school Windows style right? I still don't get the argument because Windows itself now has like 3 different styles for their system apps themselves. There is not the "one" native style.
- tonyedgecombe 6y agoThis whole area has got so muddied with Microsoft going beserk after Windows 8, the shift to the web, mass use of Electron and Apple bringing iPhone/iPad apps to macos. It's quite sad really because none of it was changed in the name of users interest.
- pjc50 6y agoThose are the true native style for Windows, yes. Microsoft's subsequent efforts aren't as good and they've not even fully committed to them themselves. WPF is on life support.
- 72deluxe 6y agoWOF is on life-support?? What do they recommend now then? I know in C# land WinForms was discouraged (no idea why) but what do they recommend now?? What is the "native" toolkit for modern C++ apps on Windows? I end up using wxWidgets because it is easy.
- tonyedgecombe 6y agoI did a couple of commercial programs with it back when Qt was charging for a licence. In the end I wish I had stumped up the money for Qt as I had a lot of problems with wx.
- VZ 6y agoMy answer at https://stackoverflow.com/a/19358996/15275 https://stackoverflow.com/a/19358996/15275 dates from 8 years ago but it's still relevant.
- deleted 6y ago[deleted]
- billfruit 6y agoAlso why not JavaFX? Perhaps even Lazarus as well. Xamarin could be a viable choice as well.