views:

279

answers:

8

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?

+1  A: 

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.

Lukáš Lalinský
+1  A: 

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.

paxdiablo
+3  A: 

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.

Desintegr
It's going to take some work to get OS X right with Qt. That said, it can be done.
Andrew McGregor
Do you think Qt is better than Wxwidgets, or do they both have their own strengths? I get the feeling that Qt is possibly "easier" to use.
nbolton
Sorry, I never used WxWidgets. You can get some info about Wx vs Qt :http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Qt
Desintegr
+4  A: 

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.

small_duck
What about Mac OS?
nbolton
I asked Desintegr about Qt vs Wxwidgets; likewise I would also like you to help me choose the correct answer. Thanks.
nbolton
A: 

Err, have you considered Swing? It has a separate, carefully engineered look and feel per platform.

EJP
"It has a separate, carefully engineered look and feel per platform." - Oh, I wish it had. Unfortunately WindowsLookAndFeel looks pretty much like Windows 2000. Luckily it's possible to plug in external LAFs, which still don't make Swing look native, but can look pretty good regardless.
Joonas Pulakka
And it's ugly and annoying on OS X; not because it looks horrid, although it does, but because none of the standard tricks works right.
Andrew McGregor
I used Swing at university, and hated it. Anyway, I probably should have mentioned that I'm looking for C/C++ libraries! :D Sorry.
nbolton
A: 

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.

Andrew McGregor
A: 

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....

Richard Harrison
A: 

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).