6 ms·
Strange nobody mentioned wxWidgets so far which gives you true native apps, so I'll do it: http://wxwidgets.org http://wxwidgets.org It provides API layer whi
by babuskov 10y ago
Strange nobody mentioned wxWidgets so far which gives you true native apps, so I'll do it:
http://wxwidgets.org http://wxwidgets.org
It provides API layer which compiles to Win32 API on Windows, Gtk2 on Linux and Carbon/Cocoa on Mac OSX.
Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API.
BTW, there's wxQt, a wxWidgets implementation that uses Qt instead of Gtk, but it's still experimental:
https://wiki.wxwidgets.org/WxQt https://wiki.wxwidgets.org/WxQt
wxWidgets has been used by some popular projects like Audacity, TortoiseCVS, RapidSVN, FileZilla, BitTorrent, etc.
Another wxWidgets advantage over Qt is the license, which gives you more freedom.
If you're looking for a faster start, take a look at wxFormBuilder which is a graphical WYSIWYG UI editor where you can drop controls in windows/dialogs and hook up event handlers.
You can find links to more related tools/IDEs on the Wikipedia page:
https://en.wikipedia.org/wiki/WxWidgets https://en.wikipedia.org/wiki/WxWidgets
- Svenstaro 10y agoIn my experience with it, wxwidgets has a very antiquated feeling to the API (I know, subjective) and it didn't ship high DPI support when I used it. Its Python bindings at the time felt rather unpythonic. Generally I wouldn't want to use this again.
- fsloth 10y ago"wxwidgets has a very antiquated feeling to the API" This should not be relevant in any professional technical discussion. Last time I looked there was not an overflowing oversupply of cross platform UI frameworks. "it didn't ship high DPI support " This, on the otherhand, might be a critical deficit.
- deleted 10y ago[deleted]
- gwbas1c 10y agoAt least on Windows, there's a new UI API every 7 years. MFC, Winforms, WPF... Maybe "wxwidgets has a very antiquated feeling to the API" really means that platform-neutral concepts do not encapsulate well when keeping the UI truly native?
- Silhouette 10y agoCross-platform with a single code base has always been a bit of a myth, if only because different platforms have different conventions for things like how to lay out dialog boxes or the writing style used for buttons. If you want something that feels like a native application on different platforms, it's always going to require some level of customisation. It's still useful to have a single UI library in your code that you can tell to make a text box or open a menu or draw some graphics and have it translate into the correct API calls on each platform under the hood. For all the much-touted rearrangements of UIs, particularly in recent versions of Windows, the reality is that most of the familiar GUI controls haven't really changed that much in decades. I think the biggest difficulty for any attempt at a cross-platform GUI framework today is probably making sure it does properly handle the widgets or behaviours that really are different or unique on each platform. More generally, if you're building for multiple platforms you also have to deal with all the installation and updating and sandboxing and so on that tends to be completely different from one OS to another, and often the GUI libraries and UI integration is a big part of that too.
- derefr 10y agoInstead of giving me the tools to make a modal pop-up, but then leaving me to match that modal pop-up to the stylistic conventions of each OS GUI, why can't a UI framework give me a "YesNoModalPopup" that looks and acts however a "YesNoModalPopup" is supposed to act on the respective OS—even going so far as to actually be a modal sheet or a command-line prompt instead? This, I think, is one of the bigger but oft-unstated reasons that people actually prefer to target the web rather than targeting native. Javascript's window.alert() is a function with a semantic behaviour-contract; it will alert the user. It doesn't specify how it'll alert the user, that's up to the browser to define. (And, therefore, up to the user to pick the browser whose definition they enjoy.) Perhaps what I'm really craving, here, is a XAML-like or XUL-like constraint-based declarative view format, which has a very high-level and abstract set of controls available to be specified. Then, different GUIs could have renderer-clients for this system, that rendered those controls in all sorts of different ways. Maybe you could even mix-and-match your favourite concrete controls, like with browser extensions.
- orbitur 10y ago> This should not be relevant in any professional technical discussion. Last time I looked there was not an overflowing oversupply of cross platform UI frameworks. That latter sentence kinda defeats the argument in your first sentence. If there's a dearth of options, then there's room for a better API.
- StavrosK 10y agoThe GP didn't say there isn't room, they said that the question is "which one is best", not "which one is good".
- fsloth 10y ago"If there's a dearth of options, then there's room for a better API." A new UI framework is not something you can wish for Christmas. One can implement one (like Blender has done) but other than that, one is limited to the options which are available. I don't think anyone claims there is no space for new UI libraries. It's not obvious one can simply implement a new one. This is not something someone does for fun over a weekend (at industrial scale) or just to try an epiphany of design over a few months. They are huge, laborious beasts. If one has resources to implement a huge UI framework, then generally, they probably have the resources to implement the UI natively on every platform they wish to deploy on. "A better API" is kinda moot feature for a UI library since they are technically so demanding, all other factors are more critical.
- bsenftner 10y agoI just started using it a few months ago, and perhaps the antiquated API you refer is the "old methods" described in wxWidgets books and such. There is a new modern-ish API with jQuery like function chaining, and an Advanced UI (AUI) subsystem enabling one complete control to the presentation layer. It is not perfect, but I'm liking it.
- Svenstaro 10y agoOk very cool. Will definitely have a look.
- ctoth 10y agoSo far wxWidgets is the only library that anybody has mentioned that actually can be counted on to make somewhat accessible UIs. To see it dismissed because it's a little crufty for the developer to work with makes me incredibly sad, as it's just part of the slow decline that leaves me as a blind person with less and less accessible stuff to use. One day I'll be stuck on an old emulated version of Windows running only apps which I have created for myself. What a bleak, shitty future.
- ufo 10y agoHow is accessibility in wxWidgets compared to GTK+ / Qt?
- nurettin 10y agoNot against wx by any means, but I actually tried it recently on osx and it drew most controls manually on a canvas of its own. So "xplatform nativeness" is not a selling point for wx.
- tonyedgecombe 10y agoMy experience of wxWidgets wasn't very good, Qt is a much better quality project.
- dom0 10y ago> Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API. This is not correct. Many controls use the native implementation of the underlying platform.
- rer 10y agoWhy many and not all? Emulating sounds like an extra layer one could do with out.
- barrkel 10y agoBecause one platform supports more options and when using that control on a different platform there are exactly two choices: break cross compatibility or reimplement the control. Add evolution of controls and idioms over time, and it's literally impossible to always unify: not all platforms evolve their non-trivial components in the same direction.
- rer 10y agoI'm glad I asked this because your answer suggests this is the main problem with cross-platform UIs. What do you think is the right thing to do? To have a common denominator kind of approach where a control works on all platforms but with fewer features, or to reimplement the control? Do you have an example handy of a control/idiom that caused this problem? It sounds like reimplementing (emulation) is a good thing.
- rossy 10y ago> Qt only emulates Windows controls, but wxWidgets uses the actual Windows controls via Microsoft Win32 API. I don't think this is actually what you want on Windows. The standard common controls are pretty outdated. Anyone who has built a complex program with a lot of widgets using common controls (or a framework that wraps them) can probably tell you that they're really slow and they have problems with flicker. They also use outdated font rendering (GDI rather than DirectWrite) and they don't natively support alpha-blending. Even Microsoft avoid using common controls. Task dialogs, Aero wizards and most control panels are built with an internal toolkit called DirectUI. Office is built with similar technology, and obviously WPF and Windows Store apps don't use common controls. This makes Qt pretty much what you want on Windows. It uses the native theming APIs so its controls look native, but they are rendered with a high performance raster engine that supports alpha-transparency and eliminates flicker. Also, I think the latest version of Qt uses DirectWrite for font rendering.