Slashdot Mirror


LXDE Previews Port From Gtk+ 2 to Qt

An anonymous reader writes "As the PCMan at the LXDE blog lets us know, the work on a port of LXDE to the Qt platform is showing promise. As the developers stand to face the deprecation of Gtk+ 2, migrating away from the popular toolkit will soon be necessary. The developers note that migration to Qt 'will cause mild elevation of memory usage compared to the old Gtk+ 2 version,' but clarify that a similar increase in resource usage is expected of a migration to Gtk+ 3. Yet, the port to Qt is ongoing, and clearly taking shape, as the screenshot shows. An official release might be a while, though. As an update to the post notes, the plan is to use the recently released Qt 5.1 in the future, which we might not see in distros for some time." They are also cooperating with the Razor Qt desktop. From the weblog post: "...We subscribed razor-qt google groups and discussed about possible cooperation earlier. Currently, the ported LXDE components are designed with Razor-Qt in mind. For example, PCManFM-Qt and LxImage-Qt will reads razor-qt config file when running in razor-qt session. We’ll try to keep the interchangeability between the two DEs. Further integration is also possible. Actually, I personally am running a mixed desktop with LXDE-Qt + Razor-Qt components on my laptop. Components from the both DE blends well."

33 of 136 comments (clear)

  1. Why QT over GTK 3 ? by Anonymous Coward · · Score: 5, Interesting

    Serious question, I'm assuming that there was a specific reason for going with QT and not GTK3; anyone know why?

    1. Re:Why QT over GTK 3 ? by dosius · · Score: 2

      I've heard the Gtk3 devs are actively trying to prevent their stuff from being used outside of apps intended for GNOME 3 itself.

      Not sure how true that is though.

      --
      What you hear in the ear, preach from the rooftop Matthew 10.27b
    2. Re:Why QT over GTK 3 ? by jbolden · · Score: 5, Interesting

      I don't know who "PCMan" is on the LXDE team but he is the author and here is what he wrote

      I, however, need to admit that working with Qt/C++ is much more pleasant and productive than messing with C/GObject/GTK+.
      Since GTK+ 3 breaks backward compatibility a lot and it becomes more memory hungry and slower, I don’t see much advantage of GTK+ now. GTK+ 2 is lighter, but it’s no longer true for GTK+ 3. Ironically, fixing all of the broken compatibility is even harder than porting to Qt in some cases (PCManFM IMO is one of them).
      So If someone is starting a whole new project and is thinking about what GUI toolkit to use, personally I might recommend Qt if you’re not targeting Gnome 3.

      Update 2013-03-27:
      I got some feedback about the toolkit choice above. Don’t get me wrong. I’m not saying that gtk+ is bad and did not intend to start a toolkit flame war. If you’re going to use python, C#, or other scripting language, gtk+ is still a good choice due to its mature language bindings.

      Vala is attractive initially, but after trying it in real development, you’ll see the shortcomings of this approach. Because it sometimes generates incorrect C code that still compiles, we got some really hard-to-find bugs. So we need to examine the generated C code to make sure it does things right. This takes much more time than just writing plain C code myself. Besides, the generated C code is not quite human-readable and debugging becomes a problem. Another issue that’ll hit you is the problems in the library bindings. Though there exists many vala bindings for various C library, their quality is uncertain. Finally, debugging, examing, and fixing the bindings all the time takes even more time and offsets the time saved by using Vala.

      To sum up, for compiled binary programs, Qt IMHO is a good choice to consider if you don’t hate C++.

    3. Re:Why QT over GTK 3 ? by jbolden · · Score: 5, Informative

      XFCE is doing fine with the transition so I assume it wasn't too much of a problem. Also I quoted the guy who made the switch for LXDE and he didn't mention that issue. He mostly thinks that GTK3 is the same weight at Qt and since he liked Qt better once they were the same weight it became the better choice. Since GTK3 isn't that similar to 2 it was roughly an equal porting effort and that's why he switched.

    4. Re:Why QT over GTK 3 ? by RedHackTea · · Score: 2

      Personally, I've never tried Qt, but I can attest to the horrible backwards-compatibility of GTK+3. Luckily, most everyone just uses Glade, so most of the time it's not *too* bad, but there are still problems and shortcomings there. However, I don't think you can really write an entire DE using Glade alone... I also think QT is the smarter choice because development on the Ubuntu Phone uses Qt w/ QML, and I believe LXDE's most thriving distro is Lubuntu. I assume this also means that we may be able to use LXDE on Ubuntu Phones with pretty good compatibility/support.

      --
      The G
    5. Re:Why QT over GTK 3 ? by phantomfive · · Score: 5, Insightful

      I can tell you why I wouldn't.......

      Both QT and GTK3 are fine GUI development environments. However, the GTK team doesn't have a commitment to maintaining backwards compatibility, which means if you write your code for GTK3, you can expect to rewrite it in a few years, with little real benefit. When choosing between two decent platforms, why not choose the platform that is more stable?

      --
      "First they came for the slanderers and i said nothing."
    6. Re:Why QT over GTK 3 ? by dbIII · · Score: 2

      Whether that is true or not the naming convention they've used effectively makes it as if they are deliberately getting in your way if you are trying to have a mixed GTK2 and GTK3 environment during a changeover. They have brought something like DLL hell to *nix for the first time in that old and new software cannot interact since it can't tell the difference between old and new vital components that act differently. That seems to have been deliberate to avoid any abandoned portions of gnome creeping into gnome3, but it's still annoying (eg. can't run the new version of gimp on a distro with a gnome2 desktop).

    7. Re:Why QT over GTK 3 ? by sidthegeek · · Score: 3, Informative

      PCMan is the original author of LXDE.

    8. Re:Why QT over GTK 3 ? by phantomfive · · Score: 3, Informative

      Can you give a reference to where you found that GTK 3.x wouldn't provide backwards compatibility?

      Sure. I strongly recommend clicking on this link from the summary, where you will find this sentence in the first paragraph: "GTK+ 3 is a major new version of GTK+ that breaks both API and ABI compared to GTK+ 2.x." It then goes on to discuss in more detail the changes that will break compatibility.

      --
      "First they came for the slanderers and i said nothing."
    9. Re:Why QT over GTK 3 ? by Drinking+Bleach · · Score: 2

      Yeah and GTK+ 2.x was API/ABI incompatible with GTK+ 1.x, pretty much setting an expectation that the whole thing will be overhauled approximately once a decade. So whenever GTK+ 4.0 is out, your 3.x apps likely won't just compile+run as-is in the new version, but there's no reason you can't have all the older libraries installed at the same time.

      GTK+ 2.x apps aren't magically breaking and GTK+ 3.x apps won't magically break either.

    10. Re:Why QT over GTK 3 ? by dbIII · · Score: 2

      Simple - there's various backends (not libraries) in gnome2 and gnome3 which behave differently, are incompatible and are called with the same names. Try installing the most recent gimp on the most recent version of CentOS or RHEL and you'll see an example of what was broken by this decision. You've got to either remove everything that needs gtk2 or give up on anything that needs gtk3. I can see why they did it (they wanted a clean slate and not have support old apps) but it still pisses me off.

    11. Re:Why QT over GTK 3 ? by bkor · · Score: 2

      That is not true. The only changes that are invasive is for themes. However, that is due to the move to css for themes and once that is done, it'll be easier to theme things. So aim is not to make things difficult, but unfortunately to make things easier it sometimes is more difficult temporarily.

  2. Re:The only thing missing... by interval1066 · · Score: 4, Insightful

    I'd like to see all Linux projects standardize on Qt as a their Gui toolkit. I understand why everyone has their own but the war is won and Qt won it.

    --
    Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
  3. Re:The only thing missing... by cheesybagel · · Score: 2, Interesting

    Personally I hate the Qt APi. It has its uses. The cross platform capabilities are a lot better and it has a lot of functionality built-in that you can only get as separate external libraries with GTK+. But I disagree that it is better to program for. GObject may be verbose but to me the object model, class hierarchies, etc make a lot more sense.

  4. Re:The only thing missing... by RedHackTea · · Score: 3, Interesting

    Here's a good history by RMS: http://www.linuxtoday.com/developer/2000090500121OPLFKE. Note that since then, Qt is now under the GPL v2.1; however, because of the history, I think most developers fear tight integration with it. "Will they ever remove the GPL in a new version one day?" is the thought in some people's minds. A lot of F/OSS may sound ridiculous and like paranoia, but it's paranoia that keeps companies like Microsoft out of the OS that we geeks love so much. Having said all of this, my personal opinion is that Qt is fine now and that the paranoia is unwarranted, but it still exists.

    --
    The G
  5. Pissing Contest By Users by tuppe666 · · Score: 3, Interesting

    I'd like to see all Linux projects standardize on Qt as a their Gui toolkit. I understand why everyone has their own but the war is won and Qt won it.

    War..Won!? All I see is healthy competition, and personally I run a whole host of Applications that I don't care what toolkit they are in. Having a look around there are some absolutely stellar QT applications http://calibre-ebook.com/, k3b http://www.k3b.org/ (although not in development for a while), MP3 Diags http://mp3diags.sourceforge.net/ and of course Clementine http://www.clementine-player.org/about. There are a few programs that can run either that I use Transmission http://www.transmissionbt.com/ and Avidemux http://fixounet.free.fr/avidemux/ . But the Bottom line is GTK+ seems as popular as ever, and still more popular than Qt.

    What is most bizarre is this about this is LXDE is looking great, a Desktop we don't hear about often enough, and is looking like a desktop I would use...half this discussion is about lets be honest a license subtlety I don't care about.

    1. Re:Pissing Contest By Users by Zontar+The+Mindless · · Score: 2

      Since k3b has worked perfectly for me nearly every time I've used it in the last 7 years or so... I'd say those devs are kicking back and admiring a job well done..

      I don't understand why Transmission is so popular. Must be because the Gnome users don't know about KTorrent.

      Speaking of GTK apps... Would you believe Mozilla Sunbird 0.9 still runs on a modern KDE4 desktop?

      (I have a need for a standalone calendar app that reads and writes remote ICS files, and it seems silly to run Thunderbird on that machine when I receive nothing other than system mails on it.)

      --
      Il n'y a pas de Planet B.
  6. Re:The only thing missing... by Anonymous Coward · · Score: 5, Informative

    Most importantly, the KDE community, way back when Nokia bought Trolltech, has managed to get in the contract a clause (still valid under Digia ownership) that says if Nokia/Digia doesn't release new versions of Qt under a free license (currently it is - to correct you a bit there - under the LGPLv2.1) for 12 months, then everything is automatically given to the community under a BSD license.

    http://www.kde.org/community/whatiskde/kdefreeqtfoundation.php

  7. Been wanting this by hockpatooie · · Score: 2

    To me, this is a good thing if it joins with and speeds up Razor-QT development. Many times I wished for a lightweight QT-based desktop (but realistically, I'm so content with XFCE+openbox I'll probably never switch)

  8. Re:The only thing missing... by Joe+Tie. · · Score: 4, Interesting

    How many times has firefox been ported to qt at this point? I remember at least two separate times that it almost got into a usable state but was then abandoned.

    --
    Everything will be taken away from you.
  9. Re:The only thing missing... by jamstar7 · · Score: 2

    I'd like to see all Linux projects standardize on Qt as a their Gui toolkit. I understand why everyone has their own but the war is won and Qt won it.

    Because it was a commercial library for a long long time and people went with alternatives, similar to LessTif vs Motif back in the day.

    --
    Understanding the scope of the problem is the first step on the path to true panic.
  10. Re:The only thing missing... by Lunix+Nutcase · · Score: 2

    It is both LGPLv2 and GPLv3.

  11. Re:The only thing missing... by afgam28 · · Score: 3, Insightful

    I don't have anything against Qt, but what makes you think that it "won"? Off the top of my head, I can't think of any major open source desktop applications that use Qt (other than those bundled with KDE). They all use GTK+: Firefox, LibreOffice, Chrome(ium), Gimp, Gnome, Eclipse and every Java app that uses SWT (and every Java app that uses Swing emulates GTK+ not Qt).

  12. Re:The only thing missing... by bill_mcgonigle · · Score: 2

    the paranoia is unwarranted, but it still exists.

    It may well be there, but there's also a marginalization of Qt/KDE by some of the largest distros (perhaps with that canard). If you look at the companies backing them, you'll see many @bigco addresses on the GNOME-related software teams and many, many fewer working on KDE. So I think some of it is simply NIH, but perhaps with a business strategy aspect of, "Who is Digia and why should BigCo be dependent on them when we have an alternative we control, even if it's not as good?" That question may have even had more merit under Nokia, especially when it was taken over by Microsoft (oh, did I say that out loud?).

    Even if it's a false dilemma, it probably keeps many people working on the projects they like inside their comfort zone. Big choices can be made on merit, but there are sometimes humans involved who apply criteria without pure impartiality. Sometimes these bigco's pick a technology horse, and boy do they stick with it until it needs to be brought out back and shot. Qt/KDE is definitely not alone in that regard!

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  13. Re:Hmmmmmmmmm by Dcnjoe60 · · Score: 3, Insightful

    I already have QT and such installed on my LXDE machine due to a couple of KDE apps I fell in love with. They work fine under Openbox/LXDE, so shouldn't be much of a problem to convert over to the new QT based DE.

    The problem isn't running QT based apps under Openbox/LXDE. The problem is rewriting LXDE componets to use QT to draw to the screen instead of GTK2. They are basically rewriting the panels and all the other components to call QT libraries instead of GTK2 libraries.

  14. Re:The only thing missing... by Dcnjoe60 · · Score: 2

    Skype?

  15. Re:The only thing missing... by jbolden · · Score: 2

    I think this dates back to the early Gnome 1 days. Compaq, Debian, Eazel, Free Software Foundation, Gnumatic, Helix Code, Henzai, Inc., IBM, Sun Microsystems, and VA Linux Systems were the guys behind Gnome 1. That's where the big company support started.

    The big company Qt guys were SUSE (Novell), Turbolinux (Asian still big) Conectiva (now merged with MandrakeSoft to form Mandriva) and Caldera (SCO).

    When Nokia owned Qt directly that certainly helped but Nokia was very parochial in its interests. Both Gnome and KDE are underfunded at this point.

  16. Re:I, for one by Anonymous Coward · · Score: 2, Funny

    I'm still on Motif you insensitive clod.

  17. Re:Hmmmmmmmmm by takeya · · Score: 2

    I was in the same boat but I finally adopted VLC as my media player and it depends on the basic Qt libraries. It is so much faster to start and uses the least memory of any video player, for GTK+ or Qt. It really proves to me that Qt code can run just as fast as GTK code, even on a primarily GTK machine.

    Also bear in mind that LXDE has not yet announced any plans to drop GTK support, but GTK3 team has been openly dismissive of anyone not developing for Gnome in specific, so it may be inevitable.

  18. Why LXDE/Qt over Razor? by unixisc · · Score: 2

    From a user standpoint, I have a different question, or a variation of this one. Why would anyone who needs a Qt based environment prefer LXDE, which is just beginning now, over Razor-qt, which has been around a bit and has a considerable headstart? Although I'd welcome these 2 merging, if that's what happens.

  19. Re:The only thing missing... by darthium · · Score: 4, Informative

    I don't have anything against Qt, but what makes you think that it "won"? Off the top of my head, I can't think of any major open source desktop applications that use Qt (other than those bundled with KDE). They all use GTK+: Firefox, LibreOffice, Chrome(ium), Gimp, Gnome, Eclipse and every Java app that uses SWT (and every Java app that uses Swing emulates GTK+ not Qt).

    VLC media player is qt-based

    And this other is less known but even more impressive, Velneo: www.velneo.com It's a RAD tool, where the awesome productivity is cross platform.

    Check a full-fledged ERP, running i Android http://www.youtube.com/watch?v=iXluV5jvmc0 The very exact set of advanced corporate features are available in Windows, MacOSX, Linux and Android. In the video, it is shown accessing a remote database in realtime. I tested it on my own, you develop once, and you don't have to know anything advanced about Windows, Android, MacOSX or Linux, to run the software you developed in such OS.

    The power of Qt is noticeable in Velneo, and I talk after a decade and half of experience in software development, including using mainstream development tools.

  20. Re:The only thing missing... by 0123456 · · Score: 3, Funny

    Not if you want things like menus and buttons, which I've heard Firefox has.

    I heard the next version will be removing the last of them, since they confuse users.

  21. Even worse.. by Junta · · Score: 2

    If they simply stated than GTK should be considered a gnome component versus gnome independent, that doesn't necessarily bother me as it is a game of semantics. However, the key sentiment that strikes me as counter-productive:

    "You can't just write something for 3.0 (be it an application, a shell plugin or a GTK theme) and expect it stay working that way forever. Instead you need to constantly improve on your work."

    Which is a huge 'screw you' to backwards compatibility. To say that reworking perfectly working code repeatedly due to platform fickleness is to 'improve on your work' is extraordinarily asinine.

    As a developer supporting a platform, I understand the appeal of declaring I have a free hand, but I know that attitude would make my solution impractical to consume. That's the whole point of 'major' releases with naming conventions that allow coexistence with 'older' streams on s system, to assure continued value to those who consumed the library. This is a standard that gnome has already badly broken (see MATE being forced to rename libraries because gnome reused a number of names in an incompatible fashion).

    --
    XML is like violence. If it doesn't solve the problem, use more.