Slashdot Mirror


QGtkStyle Offers Native Gtk Look For Qt Programs

sekra writes "A new project called QGtkStyle by Trolltech Labs gives Qt4 based applications the possibility to integrate natively into Gtk based desktops like Gnome or Xfce. Instead of simply imitating Gtk styles QGtkStyle uses the Gtk theme engine directly. The project is still considered experimental, but is another step into better integration between Qt and Gtk applications. A project at Google Code has been set up as well." Anything that makes the various excellent Free software desktops work better together deserves kudos.

64 comments

  1. GTK-Qt by cozziewozzie · · Score: 4, Informative

    There is a similar thing, only other way around: GTK-Qt, in fact it's 5 years old.

    It's good to have the option for letting Gtk users keep their look and feel with Qt options, but I wonder why it took this long?

    Is it because there wasn't much interest in Qt-based apps until now? It would surprise me, given the popularity of Amarok, K3B and the like

    1. Re:GTK-Qt by bigtomrodney · · Score: 2, Interesting

      I'm glad to see this, and I had forgotten about the old engine. One of the first things I do on a new desktop is try to synchronise the desktop look and feel for Qt and GTK applications.

      I use Gnome but I still prefer Amarok and K3b (as you mentioned) to any Gnome offering so it has helped give me a coherent desktop with a much more unified feel. I think I'd like this better as it wouldn't lock me to finding widget themes that are only available for both DEs.

      --
      I never get used to these constant resurrections
    2. Re:GTK-Qt by wild_berry · · Score: 1

      It's Qt. Like KDE, there's lots and lots and lots of options...

    3. Re:GTK-Qt by simcop2387 · · Score: 1

      this makes me wonder what happens when you try to use both at the same time?

    4. Re:GTK-Qt by kriston · · Score: 1

      Finally the gtk-qt-engine equivalent for KDE programs. I hate getting the wrong colors and fonts on Opera and K3b windows popping up.

      --

      Kriston

    5. Re:GTK-Qt by wroshyyr · · Score: 2, Interesting

      I'd say it's because of interest. Maybe GTK users got used to having different widget sets with different programs (GTK1, GTK2), while Kde users were more interested in a consistent desktop.

    6. Re:GTK-Qt by Anonymous Coward · · Score: 1, Interesting

      Opera only uses QT for the window itself. The widgets and everything else inside is their own toolkit.

      I can't remember if Opera said they were converting their toolkit completely to QT, but I don't think so.

    7. Re:GTK-Qt by pizzach · · Score: 2, Informative

      There is a similar thing, only other way around: GTK-Qt, in fact it's 5 years old.

      It's good to have the option for letting Gtk users keep their look and feel with Qt options, but I wonder why it took this long?

      Is it because there wasn't much interest in Qt-based apps until now? It would surprise me, given the popularity of Amarok, K3B and the like That answer is more simple than you think. Things like klearlooks caused good enough syndrome for a long period of time. It wouldn't surprise me if QGtkStyle leverages something new in Qt4 to make the emulation of gtk more easily possible. If you've seen the screenshots, QGtkStyle makes a good showcase of the flexibility of qt4.
      --
      Once you start despising the jerks, you become one.
    8. Re:GTK-Qt by immcintosh · · Score: 3, Informative

      Probably hasn't happened because there are perfectly good options for a unified look already. For example, the most attractive widget theme I've found for ANY toolkit is available uniformly for them all:

      QtCurve

      Highly configurable and very attractive and professional looking. Install GTK1+2 and QT3+4 versions and everything looks the same regardless of what you're doing.

    9. Re:GTK-Qt by Joe+Jay+Bee · · Score: 1

      Personally I quite liked Red Hat's original Bluecurve theme. Shame Fedora don't use it any more, because it was a really pretty, really functional theme for both major desktops (even with GTK1 support!) that was both attractive AND professional at the same time.

    10. Re:GTK-Qt by Joe+Jay+Bee · · Score: 2, Funny

      The universe implodes.

    11. Re:GTK-Qt by Workaphobia · · Score: 2, Interesting

      The GTK hater in me says, why would anyone want to make Qt look more like GTK rather than the other way around?

      *clicks link* My God, they actually have GIMP looking quite reasonable, if only it weren't for its multi-window interface.

      Now, I wonder if you could get in some sort of infinite loop if you used both this and GTK-Qt at the same time.

      --
      Evidently, the key to understanding recursion is to begin by understanding recursion. The rest is easy.
    12. Re:GTK-Qt by discogravy · · Score: 1

      well, first post in the ubuntu forums and see if there's a fix, if not, you might have to reinstall.

    13. Re:GTK-Qt by Anonymous Coward · · Score: 0

      Part of this perhaps is that it's particularly difficult in GTK. The drawing API is not very good.

      For example, if you look at the GtkStyle API ( http://library.gnome.org/devel/gtk/2.12/GtkStyle.html ), the drawing functions technically draw on a GdkWindow. Firefox and QGtkStyle get around this by passing a GdkPixmap, which also inherits from GdkDrawable. It works, but if a theme actually tries to enforce the argument being a GdkWindow, it'll fail.

      Also, alpha channels are apparently screwy. Look at the QGtkStyle's code. It draws everything twice: once on black and once on white. The two resulting images are then compared to restore the original alpha channel. Of course, this is cached afterwards, so that a redraw with the same state (hover, size, etc.) is faster.

      Although, I think a larger part is due to the fact GNOME users tend to be less willing to run Qt apps than KDE users are willing to run GTK apps. Hopefully as this integration improves (many kudos to Trolltech for trying to integrate well in GNOME) and as computers get better that two frameworks in memory become less of a problem, this unwillingness will go away. On both counts. Diversity in the Linux desktop is a wonderful thing, but we shouldn't allow speciation to occur; the two desktops should feel comfortable with each other.

    14. Re:GTK-Qt by Jamie+Lokier · · Score: 1

      Nice. From the screenshots of the link, it looks very similar to Ubuntu's default Gtk theme, Human, except the icons are more systematic, less colourful and cartoonish, and slightly more space around (all typical of Gnome vs. KDE). I think I still prefer Human+Gnome - it's always been the unsubtle icons which put me off KDE visually. Much like the difference between TeX and Word: the latter is easier to do fun stuff, but scruffy. I wouldn't apply that to the Qt widget set though: QtCurve looks great and just the right level of subtlety. I wouldn't be surprised if QtCurve came first and was mimicked to make Human.

    15. Re:GTK-Qt by jZnat · · Score: 1

      Perhaps GNOME has had a bit more new users or just people who don't really care that much about toolkits and perfectly consistent UI guidelines due to distributions like Ubuntu. Besides, KDE applications don't look too out of place in GNOME, but I can't say the same about GNOME applications in KDE. :/

      --
      'Yes, firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
    16. Re:GTK-Qt by immcintosh · · Score: 2, Informative

      You can always install a Tango theme in KDE if you don't like their awful default icons. It's what my default KDE setup does actually. I'll agree, the default KDE theming (at least in KDE3) is godawful, but once you customize it with actually attractive alternatives, I find it's actually much more attractive than GNOME (at least for me, I think it's a product of my liking the way QT lays stuff out moreso than GTK). As for the pedigree of these themes, I believe they're both independently derived from Bluecurve.

    17. Re:GTK-Qt by Anonymous Coward · · Score: 0

      You always do: KDE is built on Qt.

  2. Great. by morgan_greywolf · · Score: 2, Insightful

    Now if they could just improve the copy-and-paste and drag-n-drop integration issues (hint: There are Freedesktop.org standards for these, developers please, please, please make your apps support these), we'd be all set.

  3. Native QT look for GTK programs? by Hatta · · Score: 2, Insightful

    How about the other way around? QT is far more attractive than GTK. And QT's file dialog doesn't suck nearly as bad as the GTK file dialog. Replacing that abomination would be the best thing to ever happen to linux on the desktop.

    --
    Give me Classic Slashdot or give me death!
    1. Re:Native QT look for GTK programs? by MBGMorden · · Score: 2, Interesting

      That's a matter of personal preference. QT is a strange beast to me. Take the look of any individual widget or icon and it doesn't look bad at all. Combine them all into a functioning app though and they just don't much together well to form an attractive overall interface. GTK seems simpler, more functional, and more elegant in my eyes.

      Given that the two of us seem to have differing viewpoints here, I'd not consider it too out of line to assume that many others may also fall to one side or the other. Projects like this let them choose which they prefer. That can't be a bad thing.

      --
      "People who think they know everything are very annoying to those of us who do."-Mark Twain
    2. Re:Native QT look for GTK programs? by Anonymous Coward · · Score: 3, Insightful

      Reskinning GTK apps to look like QT apps has been around for about 5 years with the gtk-qt-engine.

    3. Re:Native QT look for GTK programs? by tolan-b · · Score: 0, Offtopic

      Are people still going on about the GTK file dialogue after its redesign? Jeez... works fine here.

      Anyway, a skinning engine isn't going to replace the file dialogue.

    4. Re:Native QT look for GTK programs? by temcat · · Score: 1

      Yes, because GTK+ file dialog lacks functionality. Speaking as somebody who prefers Gnome and GTK+.

    5. Re:Native QT look for GTK programs? by Anonymous Coward · · Score: 0
      It's the slowest thing. Ever. The Qt4 file dialog is much better. I'm not trolling, I'm not even giving an opinion, it's just a fact.

      (I use Xfce, and strongly prefer Gtk apps.)

    6. Re:Native QT look for GTK programs? by Anonymous Coward · · Score: 0

      GTK seems simpler, more functional, and ... soul suckingly boring.
    7. Re:Native QT look for GTK programs? by Nutria · · Score: 1
      GTK seems simpler, more functional, and

      ... soul suckingly boring.

      One man's "boring" is another man's "calming". One man's "eye candy" is another man's "eyes-burning-out nightmare".

      --
      "I don't know, therefore Aliens" Wafflebox1
    8. Re:Native QT look for GTK programs? by Dhraakellian · · Score: 2, Funny

      What's wrong with Trolling? The Trolls are wonderful people, as demonstrated by this project!

      --
      I've read Grocklaw. BoycottNovell, you're no Grocklaw
    9. Re:Native QT look for GTK programs? by Anonymous Coward · · Score: 0

      It still puts the filename on the clipboard, due to how it handles copy/paste with the automatic selection/highlighting. I really don't need my clipboard history cluttered up like that.

      Fortunately, I can use kgtk as a workaround for that... most of the time.

  4. How about another approach by temcat · · Score: 4, Interesting

    I would love if somebody revived the excellent but long-abandoned Metatheme project (http://www.metatheme.org/). Back when I tried it, even unfinished, it provided truly unified look for GTK and Qt and had basics for Java theming. Maybe Canonical or Trolltech or somebody else could sponsor that work, possibly approaching its original author...

  5. Unification! by VincenzoRomano · · Score: 1, Insightful

    All we need is unification of thechnologies: one to rule them all. With less fragmentation in resources we could get better products, while the customisability would remain untouched.

    --
    Maybe Computers will never be as intelligent as Humans.
    For sure they won't ever become so stupid. [VR-1988]
    1. Re:Unification! by bsDaemon · · Score: 1, Informative

      Qt used to not be Free Software -- it was just free as in beer for "non-commercial" work. You couldn't make GPL programs that included it.

      GNOME was based around Gtk and started as an official GNU project to be completely Free Software because KDE was not, at the time.

      This has nothing to do with technology and everything to do with ideology. I doubt very much that it'll change anytime soon. Frankly, if it did, that would be a bigger detriment.

      Unification makes no sense once you realize WHY the projects are what they are. Use whichever you wish, for whatever reason you want.

    2. Re:Unification! by ensignyu · · Score: 1

      That's pretty unlikely to happen, for reasons ranging from licensing to ideological disagreements to technical limitations of making one product do everything for everyone. Fortunately, many areas of open-source software have closer to two major products (e.g. Firefox/Webkit, GNOME/KDE) which provides for some degree of choice while not quite being as fragmented as having a dozen products.

    3. Re:Unification! by Anonymous Coward · · Score: 1, Insightful

      Unification is BAD.
      This is true for software, markets, companies, countries, parties, and so on.

      The reason is, that there are different parts, because not every human wants exactly the same (feature, leader, laws, philosophy, target), and sometimes those things don't mix. If you force it anyway, most poeple will be unhappy most of the time.

      In this example we have the KDE people, who go for maximum configurability (at least until 4.0 where they went insane), and the Gnome people, who go for maximum "easyness".

      I peronally think, the genome philosophy is the most stupid thing you can do, because you'll end up with the notepad of the desktop environments. But hey, others are happy with it (some people like pain too ;), so why force them to something they're unhappy with.

      And this is the central point: If you unify them, many people will be unhappy, and they will have NO OTHER OPTION. Sometimes you can't just add a option to switch between preferences. (Eg. developer's philosophy).

      Oh, and i will never get it, why most people sill haven't got it, that you can have a "beginner" mode and then gradually enable options, depending on how much of a power user the person is. (Of course you should let him decide). Every game has it. Why not evey program... The whole OS...

    4. Re:Unification! by setagllib · · Score: 1

      Well, we do have that. GNOME is the beginner mode and KDE is the expert mode. XFce is somewhere in the middle.

      Personally I prefer GNOME's design lately, even though KDE's technology is vastly better even in 3.5. Being based on Qt gives KDE a serious advantage, but it's a shame that doesn't always result in elegant designs.

      --
      Sam ty sig.
    5. Re:Unification! by Nutria · · Score: 1
      GNOME is the beginner mode and KDE is the expert mode.

      I would say that GNOME is the get-out-of-my-way mode, and KDE is the who the "fsck needs 85,000 options" mode.

      I'm sure I would have liked KDE were I a teenager (pimp my ride, and all that crap), but now I just want to use the computer (whether it be for fun/games or programming or wasting time). IMNSHO, the two user issues that should be fixed in GNOME are:
      • the horribly-slow, limited-utility Gtk file chooser. This is one area where GNOME should copy MS Windows,
      • the weak Control Center (although it is better is v2.20).

      --
      "I don't know, therefore Aliens" Wafflebox1
    6. Re:Unification! by DMUTPeregrine · · Score: 1

      No, no, no. XMonad is the expert mode widow manager. Mouse not required. Programming ability probably required, since all the settings are hard coded. Then again, it's tiny and easy to understand, so that's not a bad thing.

      --
      Not a sentence!
    7. Re:Unification! by setagllib · · Score: 1

      A window manager is only a tiny part of a desktop environment.

      --
      Sam ty sig.
  6. Here we go again-2 options when only one is needed by acomj · · Score: 0, Offtopic

    QT/ GTK
    KDE / GNOME

    Sometimes I think Linux would be better off with one option instead of many.

    Sure technically "many options" is better but sometimes fewer options that are common across all machines would make the platform more desktop friendly.

    I just use a text console and bash for my servers, and just remote into them...

  7. Re:Here we go again-2 options when only one is nee by pipatron · · Score: 1, Interesting

    Actually, it would be better of with say, 4 or 5 "big" ones. Having just two often leads to incompatibilities, since each on their own have enough users/programs/support to be able to go ahead and do their own thing. If there are 5 popular "desktop environments", one of them can't just go their own way, because that would alienate 80% of the users/programs. They would have to remain compatible at the important levels.

    --
    c++; /* this makes c bigger but returns the old value */
  8. Why? by Anonymous Coward · · Score: 0

    Why would I want to do that? When I look at gtk, it makes me want to do the exact opposite. How about something to make gtk programs look like its not 1995?

    1. Re:Why? by Anonymous Coward · · Score: 0

      Perhaps you should use more recent GTK applications or a newer theme, then. They don't really LOOK like it's 1995 any more. Usability, on the other hand...

  9. How about GNUstep? by argent · · Score: 0

    I haven't used any of the "big" window managers, my preference is Windowmaker and GNUstep apps. THey seem to have less overhead and if they don't provide all the wizzy Window/Mac transitions ... you know, I really don't miss 'em.

    What's been holding GNUstep back? It doesn't work like Windows?

    1. Re:How about GNUstep? by Anonymous Coward · · Score: 1, Insightful

      The widgets are fugly. Camaelon is pretty ugly, too.

    2. Re:How about GNUstep? by argent · · Score: 0, Offtopic

      I bet you think a Thinkpad is "fugly" too.

      The *step widgets are old, they're copying what NeXT (and Apple in Rhapsody) had in 1997. Updating the widgets to look like 2008 instead of 1997 is trivial compared to what QGtkStyle is doing, and the GNUstep frameworks are easy to modify. Look at what Apple did with the NeXTstep frameworks that they're copycatting.

      So even if they were "fugly", which they're not, that's an utter irrelevance.

    3. Re:How about GNUstep? by Anonymous Coward · · Score: 0

      Off topic but what the hey. Do you find WindowMaker to be stable? I used to use it exclusively but I got a new computer a few years back and installed a newer version than I had been using, only to find that it crashed often. I had been using Gentoo right then so I chocked it up to gentoo issues, but now I run Ubuntu and it still crashes all the time. I don't know if I have some buggy hardware or if something weird happened in the last few revisions of it. I miss it though. I'm one of the few people in the world who likes the dock.

    4. Re:How about GNUstep? by argent · · Score: 1

      I've used the Mac OS window manager and Apple's X11 pretty much exclusively since I got my Mac mini in 2005, so I haven't used any version of Windowmaker more recent than that. It was rock solid stable under FreeBSD at that point.

      I love the Windowmaker dock, and I miss it on OS X. The Mac dock is just too limited.

  10. Re:Here we go again-2 options when only one is nee by sayfawa · · Score: 2, Interesting

    I just use a text console and bash for my servers, and just remote into them...

    And how would you like it if someone took away that method and made you use a GUI in the name of consolidating options?

    --
    Free the Quark 3 from asymptotic confinement! Bring your charm! Don't get down! All colours and flavours welcome!
  11. Qt4? We need Qt3! by IBBoard · · Score: 1, Flamebait

    I read the title and thought "hurray, I can finally run the one app that I need that has a damned fugly Qt theme in amongst my Gnome desktop (VirtualBox)". Then I read the summary.

    What about all of the Qt3 apps? I know there's gtk-qt-engine to work the other way around, but given the huge number of Qt3 apps currently being used, can we not have a decent GTK look for them?

    If it wasn't for VirtualBox I wouldn't even need Qt. Amarok? No thanks, I'll take Exaile because it works and it fits in. K3B? Brasero seems to work perfectly fine to me. Erm...I'm out of remotely useful Qt/KDE apps I might want in Gnome now!

    1. Re:Qt4? We need Qt3! by immcintosh · · Score: 1

      I guess I'll continue pimping my favorite theme here even though I posted it in another thread too (since you seem to genuinely want something like it). It's attractive and available uniformly for both major versions of both toolkits. Give it a try.

    2. Re:Qt4? We need Qt3! by IBBoard · · Score: 1

      Not bad, although I think I might have tried it before and decided against it because the RPM of it drew in too many dependencies for the sake of a theme that I only occasionally see. I'll see if it was that theme and whether it works better from the download.

      My only thought from the screenshot is that the buttons look a bit glossy (which is part of what I never liked about KDE) but we'll see how it works out in the end :)

    3. Re:Qt4? We need Qt3! by immcintosh · · Score: 1

      Like, I said, it's HIGHLY configurable. Multiple glossiness levels going from none to way too damn much. The dependencies it needed were probably QT/GTK themselves. If you install the theme before any QT programs, for example, it'll pull in QT as well as all of ITS dependencies, but that's the same for really any theme.

    4. Re:Qt4? We need Qt3! by IBBoard · · Score: 1

      Nope, I already had Qt because I already had VirtualBox installed and it required Qt anyway. I installed the bare minimum of Qt (why fill the machine with bloat for a single app?) so I think I'm currently using Platinum or something - one of the core ones. Hopefully I'll get a chance to try the other theme in the next few days.

  12. still enjoying enlightenment by sgt+scrub · · Score: 1

    i actually like having different "looks" for different apps. being able to right click on the screen to get the menu, so i don't have to have a "start" menu, is more important to me than uniformity. anyway, you can have it both ways without using either window manager. ie. gtk and qt are not gnome and kde.

    --
    Having to work for a living is the root of all evil.
    1. Re:still enjoying enlightenment by Anonymous Coward · · Score: 0

      I would imagine you're in the minority. A well unified desktop goes a long way towards drawing in new users. Take Apple for example -- it does two things which account for a lot of its success:

      1) It works without any thought. Though I love the flexiblity of Linux and tend to use the command line more than GUIs, for the vast majority of users they don't want to think.

      2) It looks nice. Every application has the same unified look. I've asked a lot of new Mac users what they like best, and so many of their answers boil down to the fact that the whole computer has a sleek look - both the outside and the applications on the screen.

      I don't think anyone stated that GTK and QT are equivalent to Gnome or KDE ... though these are the two most widespread DEs (not WMs, Metacity and KWin are the window managers) and one of the most obvious differences between them is the toolkit they've decided to use.

  13. Hot damed! by Anonymous Coward · · Score: 1, Insightful

    Now KDE and my Qt apps can be as ugly as the Gnome apps! Whoohoo!

    1. Re:Hot damed! by Ant+P. · · Score: 1

      I couldn't care less about how my Qt4 apps looked, I'd just like some that work correctly first.

    2. Re:Hot damed! by eldepeche · · Score: 1

      Does this theme get rid of the Settings menu?

  14. Re:Here we go again-2 options when only one is nee by Mr.+Slippery · · Score: 1

    Sometimes I think Linux would be better off with one option instead of many.

    Sure, so long as it's the option I like...

    --
    Tom Swiss | the infamous tms | my blog
    You cannot wash away blood with blood
  15. Oh Happy Day! by tedhiltonhead · · Score: 0

    Uncanny... I was just telling someone that Qt4 applications not using the Gtk theme engine was the #1 reason Linux has not been more widely adopted!

  16. Re:Here we go again-2 options when only one is nee by vdboor · · Score: 2, Interesting

    Sometimes I think Linux would be better off with one option instead of many.

    On what information did you base this desision? It's not like Mac OS or Windows provide one way. Last time I checked, the Windows platform offers you standard widgets (=notepad look), MFC, ComCtl, VLC (Borland), Windows Forms (.Net), WPF (.Net3) and each Microsoft app has it's own toolbars again.

    MacOS gives you the choice between Cocoa and Carbon, and only gained a consistent look as of Mac OS 10.5.

    I'd suggest keeping both Gtk and Qt because each option obviously attracts a different group of developers. With initiatives like this, Linux could offer something then far more consistent this.

    --
    The best way to accelerate a windows server is by 9.81 m/s2 ;-)
  17. Simple by Anonymous Coward · · Score: 1, Interesting

    Because it's a bad idea.

    It's a good idea to make things look the same when they act the same, but it's even more important to make things look different when they act different. Qt and GTK+ act different in many subtle ways. To make one look like the other without actually acting like the other is a step backwards. It will look really cool and be much more frustrating to use; this is the kind of thing that is not a high priority for people who get paid to hack Linux.

    Ask anybody who's using a beta of Firefox 3 on the Mac how many times they've tried to drag the window by a metal-looking area. The pain.

    Now if Qt and GTK+ got together and came up with some kind of meta-behavioral-spec that declared exactly how each widget is to behave, then as a last step, sure, make them use the same themes. But we are definitely not at that point today, and based on what I've seen, I'd guess we're still at least 3-5 years from that.

  18. +5 Insiteful by Yfrwlf · · Score: 1

    Anything to help freedesktop.org, the respective DE teams, and others, to make standards to allow DEs to play together nicely deserves lots and lots of kudos. Users need to keep as much freedom as they can, and the freedom to easily use the DE they want and to switch between them is a critical part in preserving these freedoms.

    --
    Promote true freedom - support standards and interoperability.