Slashdot Mirror


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.

44 of 161 comments (clear)

  1. Re:A good example of a bad summary by mark-t · · Score: 3, Insightful

    ...or, they could just follow the link and see for themselves.

    Oh right, this is slashdot.

    But it's not even like you have to read anything. It's a video demonstration.

  2. Re:A good example of a bad summary by Anonymous Coward · · Score: 5, Insightful

    ... hence thousands of non-programmers continue to talk about how superior it is to GTK+

    Having done a small amount of Qt programming, it's also one of the most pleasant APIs I've worked with, both in its C++ form and in PyQt.

  3. Re:A good example of a bad summary by matunos · · Score: 5, Insightful

    If you didn't already know what Qt was, then you're probably not going to be particularly interested that version 5.0 is out.

  4. C++ Standards by joelholdsworth · · Score: 3, Interesting

    Did they make any moves towards using standard C++ features rather than the MOC ugliness? What with Boost::Signals, sigcxx and C++11, I see no reason why they have to bastardise the language to provide signals.

    1. Re:C++ Standards by Desler · · Score: 2

      They aren't eliminating MOC. For one thing, they support a number of compilers that don't have and probably never will have full C++11 support.

    2. Re:C++ Standards by N3Roaster · · Score: 5, Informative

      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!
    3. Re:C++ Standards by stenvar · · Score: 2

      You don't need C++11 to replace MOC. MOC was obsoleted by C++ features many years ago.

    4. Re:C++ Standards by TemporalBeing · · Score: 4, Informative

      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)
    5. Re:C++ Standards by scorp1us · · Score: 3, Informative

      First, it's not bastardized. C++11 is the bastardization, because it results in code fragmentation. That wonderful cross platform C++11 function you write can only be targeted by C++11 compilers. Meanwhile in Qt land everything keeps working on your legacy compiler. The fact that it uses compiler macros to accomplish cross-platform cross-compiler interoperability does not lend itself to "bastardization"

      MOC is not ugly, though I would prefer a C# approach of not having to separate it into a H file, but this is more a C++ thing than a Qt thing. I love the QMeta* that allows me to have introsepction at run time (again x-platform) and I can even dynamically create classes. Can C++11 do that? (Well i guess it can if it's using Qt) But they are adding C++11 syntax if you are using a C++11 compiler and want to limit your portability.

      --
      Slashdot's rate-of-post filter: Preventing you from posting too many great ideas at once.
  5. Re:A good example of a bad summary by Johann+Lau · · Score: 2

    That seems like totally valid criticism to me. So you're saying Qt is equal or inferior in all respects, and uses more resources? You should blog about this, because no amount of googling turns up remotely similar results. As a matter of fact, people seem to be quite happy with Qt, and "shinyness" doesn't even get mentioned in those discussions. Or is shiny just code for "not as fugly" .. ? Please elaborate.

  6. How is Qt still relevant? by Andy+Prough · · Score: 4, Informative

    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.

    1. Re:How is Qt still relevant? by darronb · · Score: 3, Informative

      Mine, also abandoned. I quickly stopped using the Kindle once it was obvious it was useless for viewing datasheets. http://www.griffin.net/2010/01/hacking-the-amazon-kindle-dx-part-2-qt-and-sudoku.html

    2. Re:How is Qt still relevant? by Vektuz · · Score: 5, Informative

      On the business software side, there's also well known applications like Autodesk Maya (2011 and above, they switched TO qt recently!), and also the Perforce client (P4V). I'm seeing more and more of it in the internals of "big" apps like that, even if the user is unaware. I have a feeling its partly because of the LGPL side of things opening up more than anything. Although I'm pretty sure autodesk licensed it commercially.

    3. Re:How is Qt still relevant? by dotancohen · · Score: 2

      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.

      ...Anki, Opera, Calibre, Stellarium, Krita...

      --
      It is dangerous to be right when the government is wrong.
    4. Re:How is Qt still relevant? by ChunderDownunder · · Score: 2

      The 'Burning platforms' memo killed off Nokia's Qt deployment but 2013 will see 3 offerings:

      - KDE Plasma Active running on Vivaldi
      - Sailfish running on Jolla phones
      - BB10 running on RIM phones

      (Not to mention Canonical targeting 12.04 on Nexus 7 - Kubuntu on your tablet!)

      So QML ain't extinct; it's just hibernating.

  7. A glorious day by mozumder · · Score: 5, Insightful

    This really is the best cross-platform Apps framework out there. Far better than HTML5/Javascript.

  8. Re:Tablet support? by Unknown+Lamer · · Score: 2

    The standard xinput mechanisms have full tablet support now. You can even use use cheap knockoff tablets now thanks to digimend (I got one from monoprice and it's pretty great for messing around with handwriting recognition and I've discovered that image editing with a trackball + tablet is great). Unfortunately all tablets are kind of broken except in the latest release of X.org because of a bug with coordinate transformations (basically, the pointer jumps if you make pressure changes without moving because the code transforms the already transformed coordinates... it also left touchscreens pretty broken; the guy that fixed it caused something like a dozen ubuntu on nexus 7 bugs to be closed!).

    --

    HAL 7000, fewer features than the HAL 9000, but just as homicidal!
  9. standard compliance? by stenvar · · Score: 2

    So, is it fully standard C++ now or do you still have to use their hokey preprocessor?

    1. Re:standard compliance? by Anonymous Coward · · Score: 2

      Fixed this for you:

      And it still duplicates everything that's NOW in the standard library, including containers, threads, files, etc. for the set of compilers and run times that are compliant.

    2. Re:standard compliance? by vurian · · Score: 2

      Well, you might even amend it to "provides much better implementations of things that are in the STL, , including containers, threads, files, lists etc."

    3. Re:standard compliance? by shutdown+-p+now · · Score: 2

      How exactly the magic Qt keywords like "slots" is implemented is really an implementation detail. From programmer's perspective, they are language extensions, because they introduce some new and important semantics into the language. The fact that they're handled by a separate codegen tool and stripped out of the code that's fed to the C++ compiler is irrelevant - you could just as well implement them directly in the compiler without changing their meaning, and it wouldn't magically change what they are.

      Anyway, what's the difference? Even if they are language extensions, so long as they work and provide a useful feature, who cares?

  10. Re:How? by gmuslera · · Score: 4, Insightful

    One framework to rule them all, making programs for all platforms, including mobile ones, is a nice goal.

  11. Re:Has it grown to encompass the entire OS yet? by gmuslera · · Score: 2

    You build things over it, like desktops (like KDE) or mobile (like the upcoming Sailfish) environments.

  12. Re:A good example of a bad summary by Anonymous Coward · · Score: 2, Informative

    You obviously never programmed with QT then. QT API is generally pleasant to work with in that it's well documented, consistent, and not unnecessarily complex with a decent amount of examples.

    QT is a larger framework because it does quite a bit more then GTK+ and others. In a Linux environment, that ram usage is shared so you can end up using much less ram in the end with multiple programs running on the same large library. This unfortunately is less of an advantage in Windows (where you see much less GTK+ or QT) but QT is split into several libraries meaning that you don't have to attach the entire framework to your code.

    Realistically, QT isn't that large of a library for modern applications. It's definitely not the smallest but ease of programming is something to be said.

    Is GTK+ bad? Never said that, but neither is QT. Simply pick the best library that works for you. For me, QT is definitely one of my top choices (though not always) after working with several frameworks.

  13. Re:I use it so it's relevant to me. by Anonymous Coward · · Score: 2, Insightful

    He probably means that because the brain damage management at Nokia couldn't get it going on a phone that it's doomed. Android and Apple won and if you buy into the "Desktop is Dead" idiocy then you think that mobile is the only target that matters. We won't tell the fuck head that 9 out of 10 times those "Desktop is Dead" articles are viewed from a desktop. It's confusing to them. No those are real numbers. Go look at all the sites you use to decide who's winning the browser war. They may disagree on which one is the absolute victor but they all agree that mobile browsers only account for about 10% of the total market. (Hint people are buying mobile phones because they are mobile phones more than because they come with a browser that will drive your data plan into ob$cenity. Almost no one but the hard core geek uses their mobile browser as much as the voice or texting services they purchased the phone for in the first place.)

    Now if you don't buy into the hoopla and realize that the desktop isn't dieing then Qt is relevant, useful, alive and kicking. It takes more than Nokia shooting itself in the foot with Microsoft's gun to kill Qt.

  14. Re:A good example of a bad summary by AvitarX · · Score: 5, Funny

    Even worse, I don't know what "C++" or "project mean"!

    --
    Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
  15. Re:Finally fit! by Kjella · · Score: 2

    You mean to tell me that the old version of Qt were unfit?

    Apparently it had far too little buzzword-compliance with their traditional widget-based imperative style GUI, now it's HTML/CSS/Javascript and declarative style GUI that is the "hot thing". I guess the good side is that it's like writing a web app that many developers know how to do but it has pretty much all the bad sides too, personally I find it's a giant step backwards. Or rather if I was going to do it this way I'd probably just go for HTML+JQuery and make it run in a browser against a back-end instead.

    --
    Live today, because you never know what tomorrow brings
  16. Signals and slots by zenyu · · Score: 4, Informative

    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.

    1. Re:Signals and slots by shutdown+-p+now · · Score: 2

      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.

      C++11 is not necessary for MOC-less signals/slots - Boost has been offering them for years with all existing compilers.

      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

      Sure, but what about your own types? Implementing COW is much harder than implementing a move constructor. I do hope that Qt containers use move semantics for elements when available, at least?

      Also, COW is not free when it's thread-safe. Those atomic increments and decrements do add up, especially on instances of types that are copied around a lot (strings are a classic example of that).

  17. Re:A good example of a bad summary by lister+king+of+smeg · · Score: 2

    It is not is such a unreasonable thing as to assume basic knowledge of the field. This is a site predominantly amid at compsci people and largely open source/*nix people at that. Knowing what qt is or the ability to find out on your own what qt is, is not unreasonable here. If you think they should have give you a definition of qt then why not ask for a definition for C++ as well as that would be just as nonsensical in this context.

    --
    ---Saying gnome 3 is better than windows 8 not so much a compliment as it is damning with light praise.
  18. Re:Scintilla? by AvitarX · · Score: 2

    I will add that I love their sidebar docking, floating, tabbing, etc (see Eric IDE for a good example).

    Eric makes use of QScintilla.

    --
    Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
  19. Re:I use it so it's relevant to me. by marcosdumay · · Score: 2

    Almost no one but the hard core geek uses their mobile browser as much as the voice or texting services they purchased the phone for in the first place.

    It's email (I'm resisting the temptation to finish that setence with "stupid", because you really doesn't deserve that label).

    People use smartphones for email and things similar to it, like twiter and facebook updates. Not for the web, not for complex work, but for communication.

    I used to think it was just me, but then, all the studies I've seen recently about how people read email point to that.

  20. You're right. by Andy+Prough · · Score: 2

    It's an add-on. My bad. By the way, I think the better port is here: http://www.griffin.net/2010/01/hacking-the-amazon-kindle-dx-part-2-qt-and-sudoku.html

  21. Re:A good example of a bad summary by Just+Brew+It! · · Score: 2

    Agreed. I've never developed anything using Qt, but have a pretty good idea of what it is. Even if I'd never heard of it before, a couple of mouse clicks and 3 keystrokes (assuming I've got Google or Wikipedia bookmarked) would've yielded an answer in seconds. Given this, and the fact that most people on /. probably already have at least a vague notion of what Qt does, I don't think it is necessary to explain it every time it comes up.

  22. How is Qt Quick? by dannydawg5 · · Score: 3, Interesting

    I used Qt Quick briefly. It seems like you get a lot of deep powerful customization, but that comes at a cost. It eventually pissed me off so I went back to QWidget, and my productivity soared.

    I would not have completed my project in a reasonable time using Qt Quick. It is not "quick". Sometimes, you just want to drop tables, check boxes, buttons, etc. on to your main window, tie the click event to a slot, and call it done. You are fine with whatever default styling and rendering that Qt and the OS decide is appropriate for the widget's click/hover/etc event.

    It seems with Qt Quick, you have to specify all that nonsense. Plus, the Qt Quick editor tool felt complex and confusing. I avoided it and did everything by hand. Qt Designer for QWidgets is a drag-n-drop breeze. I even got my manager on board after he saw me using it. He is an EE, and he really likes it. He is used to spending $500 on Visual Studio Pro to what Qt Designer does better for free.

    Maybe I just needed to study Qt Quick more to get past the learning curve, but I knew how to do it the widget way, and I wanted the project done.

    Has anybody had success migrating their project from QWidgets to Qt Quick? Unless I see a strong compelling reason, I am sticking with QWidgets. It works really well for me.

    1. Re:How is Qt Quick? by slack_justyb · · Score: 2

      If you are use to using QWidget and that is what you are comfortable with, then there is absolutely zero need for you to try and pick up Qt Quick. Qt Quick is really good at building one offs that you need for small tasks, think million little widgets here, not database editor. Qt5 is still centered very much around C++ and the people who wrote Qt are very aware that Qt Quick "is not for everyone".

      You may find yourself pulling up Qt Quick for implementing a "find dialog" or a "insert criteria dialog", but if you are writing the main window in Qt Quick, you either have a very modular/small project or you are using the wrong tool for the job. The best way I tell others is that Qt Quick is for doing up quick UIs, not complicated UIs. Qt Quick would be excellent for Palsmoids, horrific for an entire email application (unless you have really broken the program down to very small bits.)

      As an example, I have a program that we use here in the office to connect to PostgreSQL. The connect to dialog is Qt Quick, the window with all the tables and fields is pure QWidgets. The fill-in-the-form order request window is Qt Quick, the order summary window is QWidgets (mostly because it has all kinds of sort and filter buttons). So keep the Qt Quick stuff small and simple and you will find that it's nice to use for all those one offs that do not need a lot of logic behind the window.

      That is not to say that Qt Quick *cannot* do a large application, just that it will be easier to continue to do so with QWidget, and that is the whole point, to make things easier. Also, I strongly encourage you (and for that matter anyone seriously looking at Qt) to pick up some C++11. Qt 5 has been written to make logical use of some of the newer stuff in C++11 and those concepts do very much indeed make your code very, very clean. I will admit that I was quite skeptical at first about that point.

  23. Re:Scintilla? by RoccamOccam · · Score: 2

    What about PySide? Is it mature enough to use for full-blown apps? Did PyQT change the licensing to make PySide irrelevant?

  24. Re:How? by rocjoe71 · · Score: 2

    Hey, several of my favoruite Windows apps are in Qt (e.g. from my WinXP days: "Launchy", and current versions of TweetDeck and Calibre).

    Qt-on-Windows runtime installs much like the Visual C++ runtime, and that, for me, is preferable over any app done in Java/Perl/Python, as I don't have to clutter up my system with RTEs (that are all too often supporting a single app)

    ...and not one annoying "time to update your runtime... AGAIN" ... ever!

    --
    Height: 38U, Weight: 0 Newtons, Eyes: #0000FF, OS: Gray Matter 1.0 (Alpha)
  25. Re:I use it so it's relevant to me. by TemporalBeing · · Score: 3, Informative

    It's mature and has all the bells and whistles. Only other alternative is WxWidgets...

    What else did you have in mind ?

    Here's the basic group that Qt belongs as part of:

    • Qt
    • Gtk
    • WxWidgets (WxWindows)
    • SDL

    WxWidgets is public domain; and was the first (AFAIK) to do both Signals/Slots and Message Maps for inter-object comms.

    Gtk was originally just MessageMaps, and now also does Signals/Slots; but it also tends to be heavily GNOME centric and rather largely ignored by GNOME in maintaining it - it moves along, but at a snails pace because they're not really paying attention to it (to my understanding from talking to someone in the GNOME community).

    SDL isn't quite as feature complete as any of the others, but can get the job done.

    Qt is really the only first class library in that group, and now reaches even more platforms than ever before. And with Qt embedded, it runs in many devices that you may never have thought of as having run Qt (Microwaves, TVs, Refrigerators, etc.). Qt really is to multi-platform development what Linux is to processors in that respect.

    So in the sense that nothing else is really as feature complete and professional as Qt - yes, it's in its own category. But in reality there are several other major competitors - and all from the FLOSS community at that.

    --
    Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)
  26. Re:How? by TemporalBeing · · Score: 5, Informative

    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)
  27. Re:I use it so it's relevant to me. by Psychotria · · Score: 4, Informative

    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.

  28. Re:I use it so it's relevant to me. by byuu · · Score: 4, Informative

    SDL isn't quite as feature complete as any of the others, but can get the job done.

    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.

  29. Re:I use it so it's relevant to me. by lengau · · Score: 3, Informative

    Most people don't know what Qt is, though. They don't realise how much of the software they use uses it.

    --
    I really wanted to change my sig to something witty, but all I could come up with is this.
  30. Re:I use it so it's relevant to me. by TemporalBeing · · Score: 2

    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.

    Interesting. I hadn't looked at in in a few years (2004,2005). So they've changed their license since it use to be public domain. I was surprised at the time, but oh well. Good to see them using a nicer license though.

    --
    Truth is like the sun. You can shut it out for a time, but it ain't goin' away. - Elvis Presley (source: imdb.com)