6 ms·
One 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 every
by ZuLuuuuuu 6y ago
One 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.
- pjmlp 6y agoFrom Microsoft offerings for C++ devs, just keep using MFC, or in your case wxWidgets. They will mention WinUI, but the team pushing for C++/WinRT killed all VS tooling support that C++/CX, so for doing WinUI with C++ you are stuck editing IDL files without any kind of VS tooling support, and also have to copy/merge the generated C++ files of the IDL ones.
- marsven_422 6y agoFor the love of God do not use MFC in 2021!
- pjc50 6y agoI basically agree with pjmlp: Win32/MFC has always worked and will continue to work. > in C# land WinForms was discouraged Portability, it seems. Not unreasonably, they're focusing on C# as a backend language in UNIX-like environments. While you can run WinForms from dotnet core, doing so adds a large chunk of libraries to your deployment and of course only works on Windows targets. I'm not sure I entirely approve of this direction, but it follows from targeting Java, and I do prefer C# to Java. Of course, if you just want a little bit of the API, there's nothing stopping you from just p/invoking it out of user32.dll, which I did last month ...
- MaxBarraclough 6y ago> While you can run WinForms from dotnet core, doing so adds a large chunk of libraries to your deployment Sounds like the direction Java took, moving JavaFX (a rather underrated GUI toolkit from what I can tell) out of the core Java standard library.
- pjmlp 6y agoThat is what WinUI team would wish, but given that currently with version 3.0: - Only C# and C++/WinRT apps are supported - Desktop apps support .NET 5 and C# 9, and must be packaged in an MSIX app - No XAML Designer support - New C++/CX apps are not supported, however, your existing apps will continue to function (please move to C++/WinRT as soon as possible) - Unpackaged desktop deployment is not supported - When running a desktop app using F5, make sure that you are running the packaging project. Hitting F5 on the app project will run an unpackaged app, which WinUI 3 does not yet support. -- https://docs.microsoft.com/en-us/windows/apps/winui/winui3/ https://docs.microsoft.com/en-us/windows/apps/winui/winui3/ Most of long time UWP belivers just packed our stuff and are back in WPF/Win32 land.
- ZuLuuuuuu 6y agoThat is indeed true. wxWidgets currently has the old school Win32 style. I think WPF uses different set of controls (but I am not 100% sure). And UWP has a totally different look and feel.
- formerly_proven 6y ago> One 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. This is kind of a strawman, especially with wxPython. The basic widgets are native (like e.g. a button, text input, checkbox, combobox), yes, but most of the "advanced" widgets aren't (e.g. AUI, list and tree controls, which are not native on Gtk, dataview, propgrid, ...), and everything in wx.lib isn't (avoid wx.lib.agw btw.). Most of the latter category has no or limited support for Hi-DPI. Most of the latter neither feels nor looks native, to varying degrees. Personally I find my opinion of wx has sort of evolved like an inverted parabola. It started off kinda low, because a lot of stuff has confusing names, things are done in mildly weird ways and stuff like the layout system works in mysterious ways. It reached a high point at "this is pretty ok". Kinda went downhill from there: the layout system is just a massive pita, basic things seem to be missing because they're basically not doable with that layout system (e.g. notice how there really isn't anything in wx which provides an automatically line-wrapping text/label widget), support for rich-text/HTML/markup is abysmal, the event system is a PITA, most of the advanced widgets have are barely usable from both a programmer's and a a user's point of view (wxPropertyGrid...), there is a distinct lack of APIs for system integration (try putting or getting HTML from/to the clipboard, which is a one-liner with Qt), somehow not-flicker-free drawing is still a thing in wx, and it is not taken to be granted, the menu system is the thinnest of wrappers around the lowest of common denominators; QAction/QMenu is a far superior system of interactions. There is a pattern to this; wx generally chooses to make something a "thin wrapper over lcd". Qt generally chooses to rather make a stable abstraction (works on OS 1, probably works on OS 2), and, well, abstract. Qt has Model/View, which can be a little intimidating if you use it for the first time, but it actually works really well. wx has wxListCtrl::OnGetItemText (it also has dataview since a few versions, which is in the odd place of "way more complicated than a callback, not nearly as good as Qt MV"). Qt has QAction, wx has... wxMenu::Append. wx's way of doing things definitely has advantages (for one thing, wx is far, far less code than Qt Widgets, and if the controls you are using are native, everything truly is native, though this arguably doesn't matter any more). FWIW I probably struggled more with layouts in a single wx project in a few months than I've done in all Qt and web experience prior to that. There are just so many weird happenings which just... don't exist outside wx.
- PurpleFoxy 6y agoWhat does native control mean anyway? Isn’t GTK basically _the_ native controls of Linux?
- querez 6y agowxWidgets wraps GTK on Linux (see also https://www.wxwidgets.org/docs/faq/gtk/ https://www.wxwidgets.org/docs/faq/gtk/ ).
- MaxBarraclough 6y ago> Isn’t GTK basically _the_ native controls of Linux? Depends on the desktop environment. If you use GNOME or Xfce then yes, your native toolkit is GTK. As someone pointed out over here [0], if you use KDE then your native toolkit is Qt. (Posted from Kubuntu, incidentally. KDE is impressively polished these days.) [0] https://news.ycombinator.com/item?id=26818328 https://news.ycombinator.com/item?id=26818328
- brnt 6y agoMy pet peeve: I live on KDE, yet nobody considers Qt native! More important to me is accessibility. Does the toolkit integrate with the OS such that users can use their accessibility tools? I don't know about wx, but not all crossplatform toolkits do this consistently (or at all).
- Shorel 6y agoI run Deluge in Windows, and I can not consider Qt native for this platform. That's why.
- brnt 6y agoSomething is alien somewhere, and as others noted, for Windows specifically I couldn't tell you what native is. On Linux there's just GTK and Qt, but the count is far higher on Windows these days. I have a Qt app that blends in imperceptibly well in my eyes, while some of MS own software stands out. Point is: there is no such thing as native.
- jcelerier 6y agoEven MS ships a Qt app with the OS (OneDrive)
- simonh 6y agoQGraphicsView in particular is fantastic, it's the main reason I picked PySide for my app, but overall I've been very impressed with the polish of Qt and the quality of the documentation.