Nick Bolton
Nick Bolton

Reputation: 39690

What cross platform GUI library has the most native feel for each platform?

I've noticed that GTK has a uniform feel across all platforms, which is great for Linux lovers, but not so great for people who prefer their native GUI feel.

I haven't used Qt properly yet, which is why I'm unable to say that this is the best choice to provide the most native feel for each platform - so could someone please confirm whether Qt is what I'm after?

Upvotes: 7

Views: 3477

Answers (7)

Desintegr
Desintegr

Reputation: 7090

I think Qt is a great choice to have a native look.

On Windows XP, widgets will be rendered with the Luna style (Windows XP default style). On Vista/7, they will be rendered with the Aero theme. On MacOS, they will be rendered with the Aqua theme.

On Linux, it's different. Qt will use his own theme (Plastique style) or use your KDE theme (Oxygen theme for example). If you prefer GNOME or XFCE (GTK), Qt can also use your GTK theme.

alt text

A Qt application can be perfectly integrated in Windows XP/Vista/7, MacOS, KDE, GNOME and XFCE desktops.

Upvotes: 7

antred
antred

Reputation: 3884

Personally I prefer Qt over WxWidgets by faaarrrr. wxWidgets' API just feels like another MFC ... much too clumsy for my liking. Qt, on the other hand, is a lot closer to what writing apps in modern C++ should be like, not to mention its excellent QtDesigner (okay, wxWidgets has wxFormBuilder, but last time I checked it wasn't anywhere near as good as QtDesigner).

Upvotes: 1

Richard Harrison
Richard Harrison

Reputation: 19403

Out of Qt and WxWindows from a clean slate I'd go for WxWindows - simply because it uses the native controls which gives you better support on future platforms.

I arrived at this decision by the following unscientific process:

  • Reviewed the list of published applications and selected those that most looked like something native
  • VLC Media player vs. FileZilla - sometimes to me VLC feels quirky whereas I hadn't even realised that FileZilla was written in WxWindows.
  • 5 out of the alleged top 32 applications use WxWindows.

For me, the above is easily enough to go with WxWindows as a first choice and see where I end up after a while.

Worth mentioning that I've been doing a lot of XAML and so I'd definitely be looking into using XUL instead; as it is much nicer to get the layout out of the code.

As a footnote years ago I developed an application using the thankfully long-dead and dreadful ZincApplicationFramework - which layers it's own controls ontop much like Qt. It was dreadful and I spent ages messing about with the internals to get it to work right under Windows. This makes me prejudiced, or a least skeptical, of anything taking the same approach, because shortly after this project finished I used Allegris C++/Views to create another application, and this was much better because it was a very thin layer above the native controls - which meant that it was easy to do things and a lot more efficient.

So I may have a preference towards thin layers and native controls....

Upvotes: 2

small_duck
small_duck

Reputation: 3094

Wxwidgets uses the underlying platform to draw widgets (GTK under Linux, MFC under Windows...), so not only it looks native, but it is!

Edit - For Mac, wxWidgets uses Carbon, and is currently transitioning to Cocoa for 3.0.

Edit2 - I did not use QT myself, but people around me that used it liked it a lot. On the QT application that I've used under Windows, I have felt less native, with somewhat poorer integration with the desktop, but it could just be a reflexion of these particular developers skills.

Although wxWidgets has its quirks (somewhat poor integration on the STL, MFC-like events, sometimes hard to grasp box options, limited wxGrid...), they are being worked on, and the system is getting better and better (the new wxAUI docking widgets are awesome).

Finally, wxWidgets has been remarquably good at staying off my way when I did not need it, allowing me to use it precisely for what I wanted and nothing more. I was for example able to plug extremely easily my own socket code into the event system.

My feeling is that wxWidgets and QT are pretty much comparable, and going to one or the other will be mainly about personnal fit.

Upvotes: 6

Andrew McGregor
Andrew McGregor

Reputation: 34682

WxWidgets and Qt both look right on OS X, but don't work right unless you do a bit of extra work, because proper OS integration on OS X also requires that you get the basic AppleScript hooks right; OS X uses these for many common system GUI actions, so you need them to get (for example) drag-and-drop onto your dock icon working.

Upvotes: 1

paxdiablo
paxdiablo

Reputation: 882736

I have zero experience with Qt, but SWT has native look-and-feel for the major platforms by virtue of the fact it ships native libraries to do the job. We've used it to make Eclipse plug-ins for our various projects.

Upvotes: 1

Lukáš Lalinský
Lukáš Lalinský

Reputation: 41326

Yes, I believe it is. Qt tries had to follow the native look&feel. Not only how the widgets look, but also things like button order, etc. Of course building an application that really follows all native UI conventions is going to be hard (the Mac UI design is very different from Windows, for example), but Qt will help you a lot with it.

Upvotes: 1

Related Questions