views:

3383

answers:

10

I have been developing UI in Win32/MFC, but developing cool UI in Win32/MFC is very difficult and time consuming. Please note, I always want my code to be platform independent, So I prefer programming back-end (Business logic) in C++.

Which is the best framework for developing cool UI on windows platform? I heard of quite a few, like Qt, Flex, Delphi. What is your thoughts (Pros and Cons) on these UI development frameworks. Which one do you recommend ?

+4  A: 

I know you said you want platform independent... but WPF is by far the best UI platform for Windows when it comes to making high quality (and very cool looking) user interfaces.

It's fairly easy to learn, and extremely powerful. It's definitely a shift in the way you think about writing UI code, but that's a good thing. If you can live with the UI being tied to windows, I would say that's the best platform.

Max Schmeling
did u ever try another of the UI mentionned ?
PierreBdR
I have dabbled in some of them. I'm not an expert in anything other than Windows Forms though. I base my opinion on code I've seen and what I've read. I realize people with a lot of experience in the others may disagree with me.
Max Schmeling
+17  A: 

I would recommend Qt. It is well supported, with good customer support and it offers a good set of tool from the start (QDesigner). It will integrate easily with your C++ business logic.

The underlying principles (signals and slots) are well thought.

David Segonds
Qt seems to be a great choice for applications BUT if you are developing non-app executables (e.g., plugins that run hosted by another app) you MAY be out of luck. TrollTech told me that non-apps are not officially supported. But some people have made it work. Verdict: be careful!
jwfearn
I wish I knew a good cross-platform framework that can work in non-apps but I don't. I have to write native UI for each supported platform.
jwfearn
Qt is nice if you're writing a FOSS app, but the pricing for a non-FOSS license is very high.
Sherm Pendley
obligatory qt is now lgpl so you probably don't need to buy a license to build a proprietary application with it post.
Roman A. Taycher
+1  A: 

You might as well just bite the bullet and go to WPF. Yes, it will not be platofrm independant persay, but if you code in a way that can easily be made into silverlight, then you can host your app in the browser. Also, there is the mono project which will increasingly make most .Net functionality available on Linux/Mac.

Charles Graham
They aren't planning to implement WPF support though: http://www.mono-project.com/WPF.
Max Schmeling
Though now that I read further they are working on a Silverlight implementation: http://www.mono-project.com/Moonlight.Screenshots here: http://www.mono-project.com/MoonlightShots.
Max Schmeling
+3  A: 

I agree with Max Schmeling with regard to WPF, but if you want to stay in C++ and platform-independent, Qt is the way to go (note the spelling (; ). It is powerful, very complete, integrates into Visual Studio, looks like it should on Windows, Linux and MacOSX and is, in my opinion, simply the best library and framework for C++.

With WPF, however, you can still have your back-end code in C++ by bridging it with .NET using C++/CLI. If that solution (i.e. platform-dependent) is acceptable to you, you'll never regret switching to .NET.

OregonGhost
If you think Qt apps fit in on the Mac, or that fitting in is just a question of "look[ing] like it should," then your obviously not a Mac user. They stick out like a sore thumb.
Sherm Pendley
+5  A: 

Personnally, I really like wxWidgets : http://www.wxwidgets.org/

It is

  1. Multi-platforms : Win32, Mac OS X, GTK+, X11, Motif, WinCE, and more
  2. Multi-languages : C++, Python, Perl, and C#/.NET
  3. Free
  4. Open-source
  5. Good-looking
Barth
+1  A: 

Some new frameworks are appearing from time to time, that are a bit more modern than the widely used ones.

By modern I mean that they for example leverage features of the C++ language and the most important libraries, like Boost or even STL itself.

Note that Qt provides its own String, Network, Signals (observer pattern), Multithreading and many other classes and those are already in new versions of Boost (see boost::asio, boost:signals, boost::threads) - you have to learn APIs with duplicate functionality.

Of course creating a library as powerful as Qt would be an overkill since this one handles much more tasks than just showing windows and widgets - there's the graphics subsystem, rich text processing, xml readers and writers, nice web browser view integration (thanks to WebKit), SQL connectors, SVG classes and so forth but many of those are not used in simple or even semi-advanced scenarios so maybe it's a good time to try to create your own or improve existing ones, like WINX.

The developer of WinxGui is currently working on making the library more generic by e.g. porting WTL to MinGW so he can relieve it from ATL dependency. Next step would be to extend the WTL port to other platforms. But that's just my wishful thinking.

Qt looks great anyway. I have worked a bit with it, apps act and look like native ones and it's pretty easy to add some really cool features there, and be almost sure that your app's portability is just one compile away.

macbirdie
+1  A: 

I would highly recommend taking a look at gtkmm. It's licensed under the LGPL, which allows you to use it in proprietary projects without paying any license fees, it is cross platform, has reasonably good documentation, and it provides a very natural C++ API on top of GTK+.

jonner
A: 

Use codejock library with MFC

A: 

I would definitely want to write my UI with Windows Forms or WPF because it's so much easier than MFC or even Qt.

If you need to call a large number of C++ functions or classes from .NET, you can use SWIG to make an interface wrapper. SWIG has a significant learning curve but, once learned, it's a quick way to get access to large amounts of C++.

Qwertie
+1  A: 

If I may be so bold, I'd recommend Qt. There is now an LGPL option for Qt (Thank you Nokia!!!!) so there is no expense for a commercial deployment (unless you modify the Qt source, which is unlikely to be required). In addition, Qt is a total framework (meaning that it is not just a GUI framework) as it wraps all aspects of an application from file I/O to database I/O, to network I/O, etc.

While I love wxWidgets as well, it is mainly a GUI framework, while Qt seems to be a true "Application" framework. If I were to start a truly C++ cross-platform APPLICATION today, I'd use Qt without hesitation -- end-to-end.

paradoxpenguin
Please note: The LGPL option for Qt is as-of Qt 4.5; prior to 4.5, there is no LGPL licensing option. If I were developing a new application today, I'd use the latest Qt which would include the Qt 4.5+ license and therefore include the LGPL option.
paradoxpenguin