Become a fan of Slashdot on Facebook


Forgot your password?
GUI Handhelds KDE Graphics Software Hardware Linux

Nokia's Maemo Switching To Qt 182

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, reports from the conference." Michael Pyne also writes with a post describing day one of the conference from a KDE perspective.
This discussion has been archived. No new comments can be posted.

Nokia's Maemo Switching To Qt

Comments Filter:
  • Re:I know why.. (Score:5, Informative)

    by Kjella ( 173770 ) on Saturday July 04, 2009 @07:12PM (#28583169) Homepage

    I know why.. Because QT was released under the LGPL, sorta recently.

    Uh, maybe because Qt was bought by Nokia? They're the ones who decided to LGPL it, but they can do anything they want with it.

  • Re:N900, please (Score:5, Informative)

    by migla ( 1099771 ) on Saturday July 04, 2009 @07:50PM (#28583331)

    I think the RX-51, aka "N900" is due "second half of 2009". The OS for it will not be backwards compatible with the n800

    For OS developments regarding n8*0, check out the community project "MER" instead: []

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

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

  • Re:Starting over (Score:4, Informative)

    by glebovitz ( 202712 ) on Saturday July 04, 2009 @07:52PM (#28583337) Journal

    take a look at the new animation framework, state machine, and the declarative UI if you want to see good reasons why they are making the switch.

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

    Qt is not just a gui framework. It provides a massive amount of extra stuff. Browse the documentation: []

    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, 2009 @08: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!

  • Re:Ubuntu? (Score:2, Informative)

    by Antidamage ( 1506489 ) * on Saturday July 04, 2009 @08:40PM (#28583579) Homepage

    Ubuntu is a distro. QT is more of a graphics and application framework.

  • by umeboshi ( 196301 ) on Saturday July 04, 2009 @08: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): []

    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, 2009 @09: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 owns Qt. (Score:5, Informative)

    by Futurepower(R) ( 558542 ) <> on Saturday July 04, 2009 @09:13PM (#28583721) Homepage
    Before you read too far, realize that Nokia owns Qt []. It is not surprising that Nokia products use Qt.
  • by shutdown -p now ( 807394 ) on Saturday July 04, 2009 @09:22PM (#28583763) Journal

    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!).

  • by StormReaver ( 59959 ) on Saturday July 04, 2009 @11: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 abigor ( 540274 ) on Saturday July 04, 2009 @11:23PM (#28584189)

    Qt absolutely has bindings in other languages. For example, check out PyQt: []

  • by chill ( 34294 ) on Saturday July 04, 2009 @11:59PM (#28584353) Journal

    ...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. [] [] []

  • by Anonymous Coward on Sunday July 05, 2009 @02:37AM (#28584809)

    GTK attempts to do object-oriented code in C and the result is a mess of explicit casting and macros.

    Take a look at GTKMM [], the C++ binding for GTK+, which uses:

    • signal handlers with full C++ type safety (no macros)
    • the standard C++ library (including STL containers and iterators, unlike Qt)
    • object compositing
    • automatic memory management, including for dynamically created objects
    • internationalization with full UTF-8 support and C++ std::strings
    • C++ inheritance to define your own widgets
    • everything in nicely defined C++ namespaces

    The GTK+ people chose C because back then the C++ compilers were not as mature as they are now (which is why Qt uses its own language as preprocessor, to fill in the old C++ compiler gaps), and practically any language could call C libraries, but not C++ libraries (not without extern "C", anyway). GTKMM provides a nice alternative, too bad so few people choose to use it...

  • by Anonymous Coward on Sunday July 05, 2009 @04:00AM (#28585049)
    I have a n96. Hands down the WORST phone I have ever seen. It is the buggiest and slowest piece of crap When I first got mine I was not exactly enamored by the battery life or UI responsivity. Switching off wifi scanning gives me 2.5 days on a charge now and switching off UI effects has made the UI quite usable. I really thought I'd made a bad buy in the beginning but I'm quite happy now. Plus, not even in Linux have I found a podcast client as good as the one in the N96.
  • Re:N900, please (Score:1, Informative)

    by Anonymous Coward on Sunday July 05, 2009 @05:43AM (#28585363)

    They do not develop new OS for it. They use Linux (or they port Symbian). The OS development is not easy. You can easily write all wanted applications for the phone, from SMS to emails and calenders and phonebook. But the OS is the most difficult to develop. Thats why Nokia use Linux (linux kernel) as their choise of the OS. It is robust, monolithic and all source codes easily available with great community support. The Qt developers already supports Linux well (not the Symbian) so porting is not necessary.

  • by Anonymous Coward on Sunday July 05, 2009 @11:38AM (#28586565)
    Is your Google broken? You lazy git!
  • by JudgeJackson ( 167835 ) on Sunday July 05, 2009 @11:52AM (#28586641)
    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 [] provides a set of them and it sounds like Qt has something similar.
  • by puppetluva ( 46903 ) on Sunday July 05, 2009 @12:10PM (#28586719)

    +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.

  • by metamatic ( 202216 ) on Sunday July 05, 2009 @02:21PM (#28587473) Homepage Journal

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

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

  • by Klivian ( 850755 ) on Sunday July 05, 2009 @03:42PM (#28588015)

    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 only a GUI library, the difference gets even larger as the bindings provide so much more.

Think of it! With VLSI we can pack 100 ENIACs in 1 sq. cm.!