Qt 5.0 Released
sfcrazy writes "The Qt project and Digia, the company behind Qt framework, have released the most awaited C++ framework for developers, Qt 5.0. The company claims it's one of the best releases to date and has invested a significant amount of time behind this release. It's an overhaul of the Qt 4.x series and makes Qt fit for the future."
Update: 12/19 17:46 GMT by U L : Major new features include an overhauled graphics layer, full integration of Qt Quick for creating flexible interfaces using Javascript, and increased modularization including the first steps toward de-emphasizing QtWidgets by separating them into their own module.
It's the framework for KDE, which is the excellent, fast UI environment I use on my Linux rigs. Apparently a huge number of other projects either use it currently, or have used it in the past, including a number of well-known projects: Amazon Kindle, Google Earth, Adobe Photoshop, MythTV, Rosegarden, Skype, Virtualbox, VLC media player.
Yes and no. The signals and slots mechanism is still there and it's still using moc, but there's a new connection syntax available that's a lot more C++ like, allows C++11 lambdas in place of slots, and offers compile-time checking of connections that previously would just fail at run time. Won't please the purists, but it's a step in the right direction.
Remember RFC 873!
You can now use any C++ function as the target of a signal using the new QObject::connect() syntax. This is a huge win because with the new syntax the compiler and linker can check that the connections are valid instead missed connections just causing a run-time error.
The moc preprocessor is still required for QObject derived classes, mostly for the translation framework and also to provide support for the old signal/slot syntax which is still allowed. Qt5 doesn't require a C++11 compliant compiler, which is a good thing since there aren't yet any fully compliant compilers. I'm sure if there is a Qt6 it will require C++11 and use those features.
Some of the really cool C++11 features like move constructors aren't necessary with Qt because it's containers implement reference counted copy-on-write, so when you assign a QMap from another QMap no copy is made, and if the old QMap was an rvalue then there is never a need for the copy to be made when the new QMap is modified. One of the big improvements Qt4 made over Qt3 was to make container assignment atomic so this mechanism worked with threaded code and defensive deep copies weren't necessary anymore.
How is Qt still relevant?
Let's see...
It's the only multi-platform development kit that is really as feature complete as most platforms.
It runs on more devices than you'd ever imagine - from small embedded devices to your kitchen appliances to mobile devices to desktops and servers.
It's what KDE is built on.
It's what MeeGo/Mer/Tizen/Sailfish are built on.
It's what Blackberry 10 (BB10) is built on.
AutoDesk is built on it.
CiscoVPN is built on it (well, a really old version at least).
There's plenty more out there; but I'm going to stop there.
Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
Small correction: wxWidgets isn't public domain. It's licensed under the wxWindows Licence which, as their page states, is like the LGPL but with a few differences.
That's ... a bit of an understatement. SDL is a frame buffer, audio buffer, and input poller. For writing GUIs, it's about as feature-complete as QPainter. Sure, you can write your own GUI widget library on top of it, but that won't be pleasant for you or your users.
SDL is more suited for abstracting the platform video/audio/input APIs, and can be used nicely in conjunction with Qt, GTK+, etc.
It works for any symbol, regardless of its type. This has nothing to do with RTTI.
The API for plug-ins is platform-specific since there is no standard interface for C++ plug-ins.
Yes, you could use dlsym() when building the table MOC builds for the connector calls. That's it. That's also a very very small part of what MOC does. That could be done as part of the object constructor...except now you need to store both static compile-time information (the functions you want to add) and dynamic run-time information instead of just the static compile time stuff that MOC generates (in the moc_*.cpp files).
RTTI does a good bit of the rest of what MOC does. In neither case are they both supported by all platform+compiler combinations that Qt supports.
Qt5 now allows C++11 lambas in signal/slots; but only if you enable C++11 functionality when you build it - they still support compilers that don't support C++11 lambas.
Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)