Stories
Slash Boxes
Comments
typodupeerror delete not in

Hot Comments

Comments: 182 +-   Nokia's Maemo Switching To Qt on Saturday July 04, @05:50PM

Posted by timothy on Saturday July 04, @05:50PM
from the on-the-qt-but-not-very-hush-hush dept.
gui
handheld
kde
graphics
software
hardware
linux
suka writes "During a keynote at the Gran Canaria Desktop Summit, Nokia's Quim Gil announced that a future release of Maemo is going to be built around Qt. Maemo Harmattan is going to switch away from GTK+ / Hildon, derStandard.at reports from the conference." Michael Pyne also writes with a post describing day one of the conference from a KDE perspective.
story

Related Stories

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • That's all fun and games, but why are there no new products in the Internet Table line? C'mon, it's been almost 2 years since N810. The OS lives while the hardware was abandoned? Weird.
  • Hardly surprising, considering Hildon really wasn't very good. Sluggish, clumsy, and tending to waste a lot of very precious screen real estate - not that I see how switching to Qt changes any of those things. Still, it sounds like they're basically throwing the whole UI and all the software written for it out, and that sucks. I've long been tempted to write a little music toy app to run on my N800, but I should probably just buy an iPhone or a Pre (given that I don't actually carry the N800 around anywhere

  • I wonder about this (Score:4, Interesting)

    by erroneus (253617) on Saturday July 04, @06:45PM (#28583307) Homepage

    There is a lot of software for the Nokia N810 and below. Switching out to a new UI means a lot of stuff will either get uprooted or there will be a lot of libraries loaded into the machine's precious little memory.

    Still, if the developers of software port over to the new environment quickly enough, it won't matter but I can't imagine things will be quick enough.

    What can be done under Qt that can't be done under GTK? Is Qt more efficient in some way? What are advantages of Qt over GTK? I've never been clear on the differences... I just know they are different.

    • What can be done under Qt that can't be done under GTK? Is Qt more efficient in some way? What are advantages of Qt over GTK? I've never been clear on the differences... I just know they are different.

      Personally, I prefer Qt because of the superior documentation. I think Nokia prefers Qt because they own it now. It's sort of like when Microsoft bought Hotmail, and moved the servers from FreeBSD to Windows. It wasn't because it was better, but because it was theirs.

      • That's a really bad example... or perhaps a really dark example. In your example, that move was rather poorly done initially. They had all sorts of problems as Windows simply couldn't handle the task. Windows had to evolve to the task and as I understand it, the change was only superficial with BSD still on the back end or has that changed since I last heard?

        At the very least, if you are accurate in your parallel, then that forebodes a dark and troubled time during the change over. Of course they would

    • by abigor (540274) on Saturday July 04, @07:08PM (#28583413)

      Qt is not just a gui framework. It provides a massive amount of extra stuff. Browse the documentation: http://doc.qtsoftware.com/4.5/index.html/ [qtsoftware.com]

      Note the WebKit integration, multimedia framework (Phonon, which was a part of KDE and later folded into Qt), OpenGL support, etc. etc.

      Comparing it to GTK is like comparing a full-fledged desktop like KDE or Gnome to Blackbox.

    • by ricotest (807136) on Saturday July 04, @07:25PM (#28583519)

      First and foremost Qt is not just a widget toolkit. It is a full development environment: it has a build system (qmake), a fully-developed IDE and widget layout editor (Qt Creator) and many, many extra libraries. To quote just a few examples, there are classes to handle tray icons (whether in KDE, GNOME, Mac OS X or Windows), classes for running TCP servers, integration with the Phonon media framework, the WebKit browser, SVG, databases, multi-threaded code and even scripting support using QtScript, an implementation of ECMAScript (JavaScript).

      Qt is written in C++. GTK attempts to do object-oriented code in C and the result is a mess of explicit casting and macros. Seriously, most GTK C code looks horrible and is far less terse than the equivalent Qt program. This is mitigated when Python or Perl is used, but then you're sacrificing speed. With Qt writing C++ is basically as easy as using Java, C# or any other 'modern' language. All of the nasty stuff is taken care of. For example, Qt code is generally cross-platform.

      Its signal and slot system is also very powerful. For example, you connect a button's click() signal to the QApplication's quit() slot, and the button will cause the app to close when clicked. These signal/slot pairs can even be set via the Qt Creator IDE, just like Visual Basic! Or you might start up a webpage download and assign a slot to handle the signal sent when the page has been downloaded. Qt's signal/slots are introspective and modifiable at runtime, and you define new signals and slots just like you define new methods for a C++ class. The drawback there is that Qt programs require a pre-processing pass by moc (the meta-object compiler), in order to generate meta-data for runtime signal/slot manipulation, and to offer some syntactic sugar around Qt's features. As a side-effect, Qt adds syntactic sugar for features some might find questionable, for example adding a foreach() loop for lists.

      The build system, qmake, is quite simple: you list your source files, libraries and headers to link in a short configuration file (qmake can even generate this for you). qmake then generates a makefile from this data. This is useful as it also includes the 'moc' pass, but can be constrictive in some cases. You are, of course, not obligated to use qmake in your Qt project.

      As far as widgets go, Qt's are comparable with GTK or any other toolkit out there. Qt does a better job of looking good on non-Linux platforms, such as Windows. It has a simple but flexible widget system that is much easier to use than GridBagLayout or any of Swing's more poweful layouts.

      The main issue with Qt was that, up until recently, it was licensed under the LGPL and before that, it was under the restrictive 'Qt license'. This is no longer the case, so jump in!

      • by shutdown -p now (807394) <(int19h) (at) (gmail.com)> on Saturday July 04, @08:16PM (#28583741)

        You forgot one thing: performance. Qt guys take it very seriously, and have numerous tests showing off just how fast their rendering and layout code is. I would imagine that, for resource-constrained devices, this can be a big deal.

      • Re: (Score:3, Interesting)

        My main issue is that Qt is pretty strongly tied to C++, and I *despise* that language. Whereas GTK in C may be horrible, but the bindings to Python, Ruby and C# are all excellent and a newbie dev could easily believe they were designed for them from day one.

        However, all the other advantages you mention are still valid, plus Nokia controls Qt so overall I support this move, it was the most logical thing they could do. They've lost me as a developer, but I don't think anyone's gonna cry over that ;)

        • by abigor (540274) on Saturday July 04, @10:23PM (#28584189)

          Qt absolutely has bindings in other languages. For example, check out PyQt: http://www.riverbankcomputing.co.uk/news [riverbankcomputing.co.uk]

        • by Kjella (173770) on Saturday July 04, @10:43PM (#28584285) Homepage

          My main issue is that Qt is pretty strongly tied to C++, and I *despise* that language.

          Did you try C++ with or without Qt? I must admit, I don't like C++ outside of Qt, it brings the whole platform to another level. QStrings and QByteArrays are a godsend compared to std::string and char *. Using the QObject system I easily write applications with no memory leaks because it will delete any child QObjects when it goes, making it easy even without amy garbage collector. Finally, using signals and slots makes your application more robust - screw something up and nothing will happen because the signal never reaches its destination but it won't crash hard on an invalid pointer. Granted, I've heard you can do the same with STL and boost and duct tape, but I never managed to do it.

          • The Qt designers don't just create widgets etc, they design components that are easy to program with. As part of this, they avoid stuff that requires the tricky/ugly parts of C++. For instance, you rarely need to explicitly delete objects, because their libraries use reference counting to automagically delete objects at the earliest appropriate time.

            So it is easy for any good programmer to learn enough C++ to use Qt effectively.

            (Actually, Qt uses an extended version of C++, implemented via a preproces
                • Re: (Score:3, Informative)

                  The pattern is known as "Resource Acquisition is Initialization", or RAII. Search for that and you'll get a ton of hits. Simple rule of thumb: new in constructors, delete in destructors. There are smart pointer classes available to help you do this.Boost [boost.org] provides a set of them and it sounds like Qt has something similar.
            • Re: (Score:3, Informative)

              Do you have a source for that statement?

              What about the PyGTK and GTK websites. According to the download links the latest stable and updated PyGTK are for GTK 2.14, and GTK 2.16 has been out since the middle of March. For PyQt you don't find many minor releases of Qt that has not been followed by a updated PyQt release inside a week or two, for the last 5 years or so.

              As for being comprehensive, the Qt bindings(at least PyQt) has a close to full coverage of the Qt classes. Last I checked PyGTK did not offer the same. And since Qt are not onl

      • by StormReaver (59959) on Saturday July 04, @10:22PM (#28584183)

        > The main issue with Qt was that, up until recently, it was licensed under the LGPL....

        Slight correction: until recently, it was licensed under the GPL; but is now licensed under the LGPL.

        • by shutdown -p now (807394) <(int19h) (at) (gmail.com)> on Saturday July 04, @08:22PM (#28583763)

          With VB you just click on the component (button etc) and it takes you directly to the code.

          It would only do that for the "default" event of the component (e.g. Click in case of Button). To wire up other events - such as KeyDown or MouseMove - you still had to edit events in the property grid.

          In reality, Qt signals/slots are exactly the same concept as VB events/handlers. "Default events" are a minor convenience feature, nothing more

          I've never understood why other development environments have never taken the VB (or Delphi for that matter) route in GUI design.

          Er, which ones didn't? WinForms is event-driven, and very similar to VB (down to the "double-click the button to auto-generate event handler for Click" you've described). WPF is broadly similar. Swing uses different terminology (listeners), but same concept. Really, it's one of the basic OO patterns, and most UI toolkits these days use it.

          The thing that VB (and Delphi) truly lacked is the way to do dynamic layout of controls - this is absolutely crucial for DPI-independent and theme-independent code (you've got to be able to reflow the UI when font size changes, for example), and it simplifies localization a lot, as well. It's why all new (or just better) UI tookits - including Qt - are centered around the concept of dynamic automatic layouts; but at the same time, it's not something that you can easily edit visually (as has been demonstrated previously in case of HTML).

          That said, Qt still lets you do absolute positioning of controls in a visual designer, if you really want to have it that way (shame on you!).

        • Re: (Score:3, Interesting)

          gtkmm is sort of ok, but Qt is still superior. It has a much cleaner API, better documentation, a MUCH more powerful canvas widget, support for reflection of QObjects (very useful for stuff like RPC), etc.
          gtkmm on its own is fine, but it suffers from having to inherit the gtk wall bangers, most prominently, the API.

    • There is a version of Qt for low memory devices (was called qtopia, now something else) which would give it an advantage on the platform instead of having to custom strip back the gimp toolkit. There's also the C vs C++ choice.
    • by umeboshi (196301) on Saturday July 04, @07:52PM (#28583645)

      First, gtk+ is for C, while qt is for C++. Another major difference is that qt is more than just a widget toolkit, but an application runtime environment that provides widgets. This means that qt provides string handling, database connectivity, etc., although you don't have to use anything but the widgets and application objects, if you wish.

      I thing maemo is mostly written in C, so some parts will probably have to be rewritten in C++.

      This article may help a bit, although it only compares qt with gtkmm (the c++ bindings to gtk):
      http://www.telegraph-road.org/writings/why.html [telegraph-road.org]

      This article should be taken with a grain of salt, as it's pretty old, and may be inaccurate today.

      I started using gtk+ with python, way back in the 1.x versions. The 2.x bindings for python were much better, allowing me to write more pythonic code using gtk+.

      Later on, I decided to try out qt3, and I haven't looked back since. While it took a bit of getting used to, I found that it was easier to use qt, rather than gtk+, although I'm hard pressed to figure out exactly why.

      One of the things I liked about qt over gtk+ was the separation of the layout widgets and the interactive widgets. Coming from gtk, this was something that took me a while to understand, but once I got the hang of it, I liked it, and think that it's a better way to organize the widgets. With gtk, a vbox holds child widgets, such as buttons, labels, etc. So if you want to rearrange them in an hbox, you have to destroy those widgets and make new ones in the hbox. In qt, the layout widgets are of type "layout", and you can only have layout children in layout widgets. The interactive widgets are children of the main widget (or a child widget of the main widget). These widgets are "placed" into the layout, but can be removed without being destroyed, allowing you to rearrange the layout more easily.

      I also prefer the signal/slot mechanism in qt over the callback mechanism in gtk. On the average, it makes it easier to glue your widgets together, but there are a few circumstances where a callback mechanism is preferred, in which case you have to invent a new signal(s) and chain them together. This is because there is no order of slots called when a signal is emitted.

      Also, the qt documentation was better, more organized, and easier to read than the gtk docs (at least around the time I switched ~2004).

      Probably the largest reason why we're even having this discussion is due to licensing. Gtk gained a lot of popularity, due qt being licensed under the trolltech license, which restricted developers from using the free version in commercial products. The switch to gpl didn't do much to change this, although you could then create commercial products, but you also had to release the source for those products. So if you wanted to keep the source closed and use qt, you still had to purchase a commercial qt license.

    • by Eil (82413) on Saturday July 04, @08:03PM (#28583687) Homepage Journal

      There is a lot of software for the Nokia N810 and below. Switching out to a new UI means a lot of stuff will either get uprooted or there will be a lot of libraries loaded into the machine's precious little memory.

      As it is, minor Maemo releases can (and sometimes do) break compatibility with applications while major releases are generally not expected to be backwards compatible at all. It works the same on any Linux distro or desktop environment. Development of Maemo has moved at a glacial pace, so when Nokia switches to Qt, I assure you it will be a major release.

      I'm looking forward to Maemo on Qt 4 if for no other reason than it will make WebKit support a cinch. (The current official Maemo web browser uses Gecko and using it is generally an unpleasant experience.) In fact, if I recall correctly, there are some KDE folks trying to get KDE 4 ported to Maemo, with all the interface enhancements necessary to make it usable on small-screen devices.

    • Nokia wants a common platform across their internet tablets and smart phones. Given that the Symbian is going to support Qt, and the Symbian user base is much greater, its makes sense that Maemo would want to have access to the 3rd party apps written for the user base that numbers in the millions

      And really it was clear in the talk he gave that the Maemo stack is still mostly unchange, and still using most of the Gnome libraries including crucial stuff like Tracker. Really even with the change in UI toolkit,

    • Re: (Score:2, Interesting)

      Unfortunately, the n8x0 development community has been kind of dead since the introduction of The Great One. It isn't completely gone of course, but it is a lot less active than it was a year ago. The current stable of apps aren't going to be as useful as we would like them to be. The other thing is that there never really was that many to begin with, nothing even approaching what the iPhone has. Most of the development seemed to revolve around fixing deficiencies wit hteh OS(alternate environments, media p

      • Re: (Score:3, Insightful)

        Most of the development seemed to revolve around fixing deficiencies wit hteh OS(alternate environments, media players, web browsers and other things that got done right the first time in android/iphone/pre).

        Fully agree. Some of my most-used apps are competitors for built-in ones (Canola and MPlayer top the list, MaemoMapper, I also used Modest in competition with its built-in email some time ago).

        KDE devs who were never interested in writing gtk for the n800 may now get excited about the 900 and pick it up.

        ...and the existing pool of Gtk+ developers get frustrated after Yet Another API Change, and leave.

        There's never going to be the glut of third-party apps that the iPhone enjoys, when the API isn't stable - and you'd have much better luck again if you could keep the ABI stable for more than a year or two...

        I really lov

    • Can you name three apps that are available for Maemo that you would honestly miss?

      The mail app blows, the browser sucks, the media player is lousy, and the application manager is beta-quality, at best.

      Don't get me wrong, I love my n810, mostly for the hardware - Maemo is a drag.

      -

      Qt vs GTK: http://slashdot.org/askslashdot/01/11/21/0227206.shtml [slashdot.org]

      • Not three... but one -- the GPS mapping and routing app. But as someone else was describing how Qt covers a wide range of functions including SVG rendering, I think that perhaps such map software might be improved with a port from the existing Maemo to the future Maemo.

        Just about any other apps that follow, I'm sure, will be acceptable. It plays music. It plays video. It plays some simple games. It's a portable device. It does what I wanted it to do and I am sure under a new environment, it might well

  • by Anonymous Coward on Saturday July 04, @06:51PM (#28583333)

    It seems like they're still planning on using a lot of GNOME components [vuntz.net], but putting a Qt skin on it. I just wonder if it is the best of both worlds, or the worst of both worlds...

      • I can think of a couple like GStreamer and Telepathy, but in both cases the support isn't 100% yet. And both are really crossdesktop from the beginning (Telepathy is just a DBus spec after all)

  • I can tell you right now, this will kill Maemo. QT is a pretty good GUI toolkit, but this is going to draw in QT Embedded (QWS server and such). I personally have been working on an Embedded QT device for 2 years and can tell you, QT Embedded is horrible. Nothing more then a Demo written by Trolltech to try and expand the market share. The biggest pain with QT, is that since it tries to be cross platform is it re-implements everything (Networking, Audio, Mutexs etc... etc..). They make it fairl
    • Re: (Score:2, Insightful)

      The real story is the Nokia / Intel announcement of cooperation on Atom/mobile products. Intel seems rather focused on Mobilin for MID with a long term strategy for handsets. While Nokia will be pushing their Ovi stores/maps/content with a new UI for Symbian. I doubt that Nokia ever looked on Maemo for more than an R&D effort. Commercially it was never a success nor a viable consumer product - a geek toy yes, a popular consumer product never. Maemo is irrelevant. The real thing to watch is the In
      • ...except at least they were attemping to make a useful device from day one, while Nokia has totally let that ship sail into Apple's hands.

        Is that Kool-Aid good?

        Nokia sells 4x more smartphones than Apple does, with over 40% of the worldwide market. Nokia has won more design awards for phones than Apple, by a long shot. They even have smartphones (n97) that handily beat the iPhone. The problem is, Nokia caters to users NOT phone companies and thus the North American carriers don't sell their smartphones. All you can really get in the U.S. is their standard phones.

        They're trying to get a bigger presence in the U.S. market, and are examining how to leverage QT, Symbian and Linux in doing that. At least they aren't sitting on their collective asses (like Motorola) and getting crushed.

        Don't write them off.

        http://money.cnn.com/2009/01/12/technology/hempel_nokia.fortune/ [cnn.com]
        http://news.cnet.com/8301-13579_3-10245339-37.html [cnet.com]
        http://www.nokiausa.com/find-products/phones/nokia-n97/specifications [nokiausa.com]

        • Re: (Score:3, Interesting)

          I absolutely agree with you that too many people write Nokia off the phone market due to nothing but "kool-aid". Either Apple or Google (android) kool-aid. Or the fact that they only know the US market, but have no idea of what happens elsewhere.

          One point people seem to miss is that not everyone wants/can/will buy such ridiculously expensive phones to start with.

          However.... I own a G1, have messed around with an iPhone, and played a lot with my GF's Nokia 5300 X-Press music. Nokia's current problem is that

  • by jipn4 (1367823) on Sunday July 05, @02:59AM (#28585045)

    Nokia has its own lightweight GUI library that they use with Symbian--and their UIs suck. They have built applications with Gtk+--and their UIs suck. They have build Windows and OS X desktop apps--and their UIs still suck. I think the problem Nokia has with GUIs and software has to do with how they develop software, not whether they use Gtk+ or Qt.

    Another problem with their choice is that it ties them to C++; the trend in mobile development, however, is towards other languages, like Javascript (Pre), Java (Android), Objective-C (iPhone), and C# (Windows Mobile). Only Symbian steadfastly clings to C and C++. That would be fine if Symbian actually ended up being the fastest and having the best UI of the bunch, but it's actually the slowest and least responsive of the bunch.

    • Re: (Score:3, Insightful)

      Another problem with their choice is that it ties them to C++; the trend in mobile development, however, is towards other languages, like Javascript (Pre), Java (Android), Objective-C (iPhone), and C# (Windows Mobile).

      Actually, I think this will end up being a competitive advantage in the long run. If Nokia smartphones end up being the *only* smartphones that run (mostly) raw native code compiled straight for the metal, they will end up being the fastest in the long run, given equivalent hardware.

      That would be fine if Symbian actually ended up being the fastest and having the best UI of the bunch, but it's actually the slowest and least responsive of the bunch.

      The problem with Symbian isn't C++ - it's C++ done horribly wrong, and series of unfortunate technical choices (e.g. pervasive client-server architecture).

        • by ultrabot (200914) on Sunday July 05, @04:26AM (#28585299)

          No, they won't. C++ is fast for small inner loops because programmers there can take full advantage of its features. Big applications end up being slow and bloated in C++ because programmers simply cannot manage the complexity anymore: all their time goes into chasing pointer bugs and dealing with include files, and little remains for performance tuning and algorithms.

          That's bollocks. C++ is not really that much less productive than Java/C# if you have a good platform toolkit to go with it (Qt). With Qt, you don't really manage your memory manually most of the time, the classes do it themselves through implicit sharing.

          Admittedly, C++ is much less productive than Python & other dynamic languages, but that's not the issue at table here; we are comparing against Java, C#, ObjC.

          And what is this "long run" you're speaking of anyway? If it takes 5 years for Nokia to optimize their current C++ applications, do you think anybody will care?

          The phone applications easily have a life span of several years. They get improved, but rarely rewritten.

          This applies even more so to "platform" level stuff. If you write more of that in C++ than Java, you'll have a faster platform, given equivalent algorithms.

          There is no "in the long run" for software; what counts is what you can deliver in 3-6 months, not in a few years.

          It seems Nokia was able to turn a profit with Symbian, even if Symbian is widely dreaded as the least productive programming environment in existence. I believe they will do great with Qt, and attract a great deal of third party interest as well.

    • by metamatic (202216) on Saturday July 04, @09:49PM (#28584045) Homepage Journal

      With the Mono infection and the reliance on GTK, the best thing would be for GNOME to go away. It started because Qt wasn't LGPL. That no longer applies, so let it die.

        • Re: (Score:3, Insightful)

          I am using KDE 4.2 right now, and it is amazing. Everything works well, no bugs, no problems. The underlying tech is easily superior to gnome as well.

          Honestly, how many KDE4 bashers have actually *tried* it?

          • Re: (Score:3, Informative)

            +1 for the parent posts.

            Although the gtk/gnome UIs have always been awkward and clunky, they've never been dangerous before -- With the mono infection, they're downright dangerous.

        • Re: (Score:3, Informative)

          And Linus began Linux because he didn't know FreeBSD existed.

          FreeBSD 1.0 was 1993. Linux started in 1991. Fail.

      • Pretty much everything I've done with Qt tells me KDE should be a much better desktop than Gnome. But the truth is that most of the large desktop distributions use Gnome, Ubuntu is much bigger than Kubuntu and same goes for the others. None of the big three hitters Firefox, OpenOffice or GIMP are KDE applications - ok not all are Gnome apps either but there's not many "killer KDE apps" around. Don't get me wrong, they're all perfectly okay but nothing really rocks the boat.

        The think I like least about each of Firefox, OpenOffice and GIMP is the user interface, for which I blame GTK. For example, Firefox's application chooser dialog makes me want to slit my wrists.

    • Re: (Score:3, Insightful)

      > One thing that sounds incredible wrong to me is the fact that they are saying that Qt was chosen to make "easier cross-platform-development". [...]
      > The move is simple political: Nokia controls Qt now, so they will use their own toolkit. It's not based on merits of the toolkit (or problems of the other.) But hey! Why tell people the truth, right?

      And the reverse couldn't be possibly true: That Trolltech Qt was bought based on the merits of the platform and because Nokia expected easier cross-platform

pain, n.: One thing, at least it proves that you're alive!