Sign in to follow this  
MARS_999

wxWidgets vs. Qt

Recommended Posts

MARS_999    1627
Anyone here used both?

Is it true that Qt is now free to use in your own projects? e.g. SDL or SFML

Meaning do I need to pay to use it in my own projects, even if they are commerical?

Thanks!

Share this post


Link to post
Share on other sites
SimonForsman    7642
[quote name='MARS_999' timestamp='1325370293' post='4898541']
Anyone here used both?

Is it true that Qt is now free to use in your own projects? e.g. SDL or SFML

Meaning do I need to pay to use it in my own projects, even if they are commerical?

Thanks!
[/quote]

You've never had to pay to use QT in commercial software. (The GPL (Which QT used a very long time ago) doesn't forbid commercial use or selling binaries, it only requires you to provide the sourcecode to your customers under the same permissive license)

QT currently uses the LGPL(Which is a bit more permissive than the GPL) v2.1 (Same as version 1.2 of SDL) which works fairly well unless you:
1) Want to distribute your software on a platform that prevents the end user from modifying the LGPL portion of the software, (iOS and consoles for example)
2) Intend to make significant improvements to the LGPL licensed library and wish to keep those secret.

Share this post


Link to post
Share on other sites
swiftcoder    18432
[quote name='MARS_999' timestamp='1325379577' post='4898580']
So anyone here prefer one or the other?[/quote]

Speaking from (somewhat limited) experience of the two: QT strikes me as both more feature complete and more polished. However, it's more than just a library - QT includes several custom extensions to the C++ language, that require the use of their own 'pre-compiler', so you also tend to become tied into their build system/ecosystem in a way that I don't personally favour.

You might also consider GTK+ in relation to these two, though I find that their support for Mac/Windows is not as perfect as one could hope for.

My personal preference would be to avoid monolithic UI toolkits entirely. Go with something like Adobe Air or Mozilla's Prism, and build your UI in HTML/CSS/Ajax with a local loop server to communicate with the backend...

Share this post


Link to post
Share on other sites
SeaBourne    120
You can view Qt as the C++ version of the .NET.I've personally have used Qt, and still continually use it for applications. The thing Swftcode complains about is the MOC (Meta Object Compiler). While it has it's flaws like you can't use it on template classes. I personally see no reason to complain about it as it is done behind the scenes, and you never have to manually do it. MOC also allows you to invoke constructors, properties, et cetera. I've create a powerful SQL library based on the meta object system of Qt and it is really nice. Just because of that shouldn't influence you not to use it. While it is big I do agree, but it is the most powerful GUI library for C++. I've hardly ever had to rely on boost for features, or 3rd party libraries, but then again I don't create a huge something to need billions of dependencies. Qt has it's own IDE (Qt Creator) although you can still use Visual Studio if you prefer. You just need the VS plugin. Qt also has Linguist, Designer, Documentation (all applications) for multi-language support, design your gui, and documentation respectively. Another thing, you don't have to touch raw api's like Gtkmm, wxWidgets. The documentation for Qt is well written and provides a ton of examples.Just look at all the major companies that use Qt. If you look on C++ job postings a lot of them would like ones with Qt knowledge.JS.
Qt has been free since version 4.5.0 and it's at 4.8.0 right now (just released 4.8.0). It has support for OpenGL like QShader, QMatrix4x4, etc. Although you might have to extend it somewhat. It also just recently added a class for raw gl functions.

I haven't used wxWidgets in a long time, but I didn't even like it then. I cannot stand the message map garbage like you see in MFC. It is too bloody ugly. wxWidgets string class isn't that powerful as QString. wxWidget's networking class is really awful. You don't get that many options/signals to be notified of. You will have to implement most yourself. It doesn't even have SSL support afaik, nor does it support proxy out of the box. While Qt has Udp, SSL, Http, Proxy, Local sockets, etc. Personally the documentation is hard to navigation and just ugly. The build system isn't any better. You have to manually edit a configuration file to set it up. Sometimes it just a pita to do. Qt's favour more of the autotool like ./configure -ssl --no-webkit, etc, but it doesn't use autotools.

Share this post


Link to post
Share on other sites
Hiwas    5807
I'm also a believer in QT versus wxWidgets for all the above reasons. Given the QT integration with CMake, which I use for generating VC/gmake/xcode etc builds, the whole Moc business is really not so bad anymore. Overall though, as much as I tried to like wxWidgets it simply doesn't have the support and professional level of quality which Qt does. The other additional item which I find much more important is that everything generally just works when going from OsX to Win32 to XWin, there are only a very few gotcha's between the platforms compared to wxWidgets which has a lot of "#if _WIN32/#else/Etc" stuff needed to keep everything happy on the related platforms.

As to the freedom level, you have been able to use QT for a very long time but the Designer (a pretty integral part) if used generally triggered the GPL such that you had to buy a license just for the designer or open source even internal tools. This is the biggest change made in the last couple years, the designer no longer triggers the commercial clause, and makes the platform appropriate even for internal use only if you need something quick and easy to use for GUI systems.

Share this post


Link to post
Share on other sites
issch    479
I haven't used wxWidgets in a few years, but I do a lot of Qt development nowadays. Qt is a very solid, complete, modern and well designed framework with many components which you can pick and choose from. Using the precompiler is only necessary for QObject derived classes like widgets and windows, so if this causes a problem, its possible to factor those parts out so you can precompile them separate from building the rest of your executable and then only re-compile with the Qt MOC (metaoblect compiler) if you change those classes.

I would personally highly recommend Qt for GUI development, especially if you use C++ or Python (PyQt, Pyside). In the past, I have used wxWidgets, GTK+, FLTK, Fox and Qt in C++, PyQt, Tk and PyGTK in Python and Swing in Java and out of all of those, Qt is my favorite one.

Share this post


Link to post
Share on other sites
mdwh    1108
I love Qt, and use it both for cross-platform desktop and Nokia smartphone development. I don't have experience of wxWidgets, but I have previously used toolkits such as MFC, Windows Forms, Java Swing. Note that Qt isn't just a GUI toolkit, but a complete application toolkit with APIs for a large range of different things (e.g., graphics rendering and processing, sound, network, multithreading, mobile support).

It's true that it kind of is a whole development environment in itself, with modifications made to C++, but that's not that different to say using .Net/Windows Forms with C++. It's still easy to get it to compile on Linux using the standard make system. Qt Creator is a perfectly good IDE (though it's apparently possible to use Qt with Visual Studio?)

[quote name='SimonForsman' timestamp='1325376306' post='4898563']
You've never had to pay to use QT in commercial software.[/quote]Actually, ISTR at one time Qt was only free for Linux, but Windows required the proprietary licence ( [url="http://en.wikipedia.org/wiki/Qt_(framework)#History"]http://en.wikipedia....mework)#History[/url] confirms this). Although yes, that's old news now.

Share this post


Link to post
Share on other sites
clb    2147
We used wxWdigets, and then realized its featureset is quite short compared to Qt and switched to it. I think Qt is better. Though, in the past two and half years, Qt has made me cry to sleep many many times.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this