LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-21-2010, 03:11 AM   #1
slackmate
LQ Newbie
 
Registered: Dec 2009
Distribution: Slackware 13
Posts: 15

Rep: Reputation: 0
Which GUI library works best with Fluxbox?


Hi,

I am planning to develop an application that will have a GUI. The first priority is stability and second is performance. Portability and eye candy is not important. To fit these primary requirements the app will be run under and optimized for Fluxbox WM.

What is the best GUI development kit such as Qt, GTK or FLTK that is best fit for such an app? I mean what is the most stable, reliable and fast GUI development library that works best with Fluxbox?

Thanks in advance for answering this question.
 
Old 01-21-2010, 04:05 AM   #2
vince4amy
Member
 
Registered: Dec 2008
Location: Great Britain
Distribution: Slackware
Posts: 58
Blog Entries: 1

Rep: Reputation: 17
Most of my favorite applications are QT and work just fine. However from what I've seen most other people take preference with GTK.
 
Old 01-21-2010, 04:20 AM   #3
slackmate
LQ Newbie
 
Registered: Dec 2009
Distribution: Slackware 13
Posts: 15

Original Poster
Rep: Reputation: 0
I read through most of the GUI toolits related posts and I am convinced that GTK or Qt are more then capable. My concern however is the size of these toolkits. Would using a light-weight kit such as FLTK gain any advantage in terms of stability and performance for an app run under Fluxbox?

I come from windows/.NET background and I know that while it's easy to build a feature-rich GUI app in c# it quickly becomes very bloated and very slow. That's due to the sheer number of layers of libraries and the calls between the screen and the actual graphics engine, as well as because one control is inside another, inside another, ... By the time a mouse action gets to the OS graphics engine it's days. Not to mention the system resources consumed. I am just worried that if I build a screen with lists of widgets in Qt or GTK there might be a similar problem? (I am sure not to such extent)

Last edited by slackmate; 01-21-2010 at 04:32 AM.
 
Old 01-21-2010, 05:21 AM   #4
Ivshti
Member
 
Registered: Sep 2008
Distribution: Linvo
Posts: 132

Rep: Reputation: 43
Hello,

I don't want it to sound offensive, but please stop being paranoid of the stability/performance of GTK+ and Qt. Those toolkits are developed by a lot of experienced people and were started a long time ago, and I've also never seen an application crash because of GTK+/Qt.
As for the performance concerns, GTK+ or FLTK - it doesn't matter, at least on a modern computer.

Cheers,
Ivo Georgiev
 
Old 01-21-2010, 07:01 AM   #5
slackmate
LQ Newbie
 
Registered: Dec 2009
Distribution: Slackware 13
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the replies!

I just learnt which apps on my Fluxbox are GTK and which are Qt and I find that Qt apps look more modern with nicer icons, roundness and general eye candy. However the fonts are a bit washed out like there is too much antialiasing of as if the monitor resolition is not optimal. I compared all this with the GTK apps. The GTK applications look a bit arcane as in pre-Win XP look. However the fonts in the GTK and the general look and feel very crisp and they seem to load and respond a little bit faster. I can feel a little bit of a bloat in Qt: I can see how the wingets are being built and then populated with values a split second later, as well as some flickering when opening dialogs from menus.

Because I dont need the modern looks and eye candy of Qt I am close to deciding in favour of the crisp and nippy GTK despite its outdated looks. The biggest problem I got with GTK is that its natively in C and its c++ wrapper might rob it off its performance advancage.

If people could comment on this I'd gretly appreciate it.

Last edited by slackmate; 01-21-2010 at 07:12 AM.
 
Old 01-21-2010, 08:10 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
My only comment is that I think you are working to hard on this. As a user, when I install something, the package manager gets the required libraries--be it GTK, QT, or something else. I could not look at any of my apps and tell you what toolkit it was built with.

I would choose based on ease of use (during development) and licensing.
 
Old 01-21-2010, 11:14 AM   #7
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,242

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
There's no such thing as "optimized for Fluxbox." And the kinds of app that use GUI toolkits spend 99.99999999% of their time waiting for user input; the choice of toolkit makes no speed difference at all.

That said, I like Qt best. It's object-oriented, has extremely good documentation, and is as fast as anything as long as you're writing a Qt app and not a KDE app. Here's an article on how much though was put into its API:

http://doc.trolltech.com/qq/qq13-apis.html

And here's a KDE program I wrote. Using Qt didn't slow it down. Writing it in Python didn't slow it down. Making it a KDE program and not just a Qt program did make it take longer to load, but it ran at the same speed.

http://www.vcn.bc.ca/~dugan/quetzalcoatl.html

If your target platform is a Pentium 1 (speed differences between the toolkits aren't detectable otherwise), then use GTK1. It's faster specifically because it doesn't go through Fontconfig or Cairo do to font rendering. Which means you lose support for Unicode characters and decent font rendering, you only have access to font directories specified in xorg.conf (which is no longer present on many installations), and you need to specify fonts via variations of the mile-long names you see in xfontsel and xslfonts.

Quote:
Originally Posted by slackmate View Post
I just learnt which apps on my Fluxbox are GTK and which are Qt and I find that Qt apps look more modern with nicer icons, roundness and general eye candy. However the fonts are a bit washed out like there is too much antialiasing of as if the monitor resolition is not optimal. I compared all this with the GTK apps. The GTK applications look a bit arcane as in pre-Win XP look. However the fonts in the GTK and the general look and feel very crisp and they seem to load and respond a little bit faster.
These are user-adjustable settings. The defaults are certainly not a good criteria for choosing.

See:
Quote:
I can feel a little bit of a bloat in Qt: I can see how the wingets are being built and then populated with values a split second later.
Have you examined that program and then ran a profiler on it? No. Then how do you know that the bottleneck is the GUI and not some other part of the program?

It is very unlikely that you'll find even a technical speed difference between the current versions of GTK and Qt, because they both call the same sets of libraries (e.g. Fontconfig and Pango for font rendering, X to draw widgets) underneath. And no, launching a completed GTK app and then a completed Qt app doesn't tell you anything. Instead, write a Hello World program in GTK2, Qt4 and FLTK and see if you notice a speed difference.

Quote:
Originally Posted by slackmate View Post
as well as some flickering when opening dialogs from menus.
Actually, Qt is specifically design to prevent this:

http://qt.nokia.com/doc/4.0/qt4-arth...uble-buffering

Quote:
The biggest problem I got with GTK is that its natively in C and its c++ wrapper might rob it off its performance advancage.
It will make absolutely no difference at all. Seriously, how many extra CPU cycles do you think the cost is?

Last edited by dugan; 01-21-2010 at 09:16 PM.
 
Old 01-21-2010, 02:05 PM   #8
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
I hate GTK style file pickers (like Woodsman iirc) but as an end user I much prefer GTK over QT. Most apps use GTK or another non-QT toolkit and I don't particularly like having both loaded. In addition, QT is a very large package and as someone not using KDE it loads many unneccessary libraries that take resources. Granted on new computers it doesn't make too much of a difference but that is my opinion, as someone who runs xmonad instead of KDE. If it's an app I won't be running 100% of the time then sure, QT is fine. If it's something I'm going to be leaving open then I would much prefer GTK since it'll be loaded on almost any system anyway due to the number of apps that use it.
 
Old 01-21-2010, 04:42 PM   #9
slackmate
LQ Newbie
 
Registered: Dec 2009
Distribution: Slackware 13
Posts: 15

Original Poster
Rep: Reputation: 0
I agree with Duganwhen - the GUI is not nesessserily is the bottleneck. What I said about some apps' dialogs loading slower in Qt is absurd actually. However there is another small difference between the two: I opened some apps written in GTK (GIMP and gFTP) and some from Qt (Korganizer and Kontact) Once loaded, I go to GTK GIMP's Open Image dialog and simply drag around the corner of the window reasonably fast - and the contents of the dialog are resizing instantly and crisply.. Same story for gFTP - when quickly resizing the window the contents responds instantly and very smoothly.

Now when I try dragging around the corners with Qt apps - the contents is being resized and redrawn with a signinficant lag. Please tell me if I am wrong but this is the sign of a (minor) bloat. I havent seen the Qt code but it seems like it's the case of Qt GUI objects being large and heavy, while GTK+'s are small and granular. Judging by this and from my .NET experience I suspect Qt has to be easier and quicker to develop, while DTK would be harder and a bit akward. However the performance seems to be on the GTK's side.

What are the holes in my argument? Please comment.
 
Old 01-21-2010, 09:11 PM   #10
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,242

Rep: Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322Reputation: 5322
Korganizer and Kontact don't use Qt dialog boxes. They use KDE dialog boxes. There's a difference.

And if you're determined to choose the toolkit that performs better now (keep in mind this may change), then you should run formal performance tests that give you numbers to compare. And publish your findings because no-one's actually done that yet.

EDIT:

Found this. I don't know how relevant or current it is, but it's interesting:
http://zrusin.blogspot.com/2006/10/benchmarks.html

(Lots of interesting stuff on that blog, actually. Check out the front page).

And here's some benchmarking information that I just came across:
http://gtkperf.sourceforge.net/
http://pepper.troll.no/s60prerelease...tutorial5.html

Last edited by dugan; 01-21-2010 at 11:32 PM.
 
Old 01-22-2010, 09:07 PM   #11
slackmate
LQ Newbie
 
Registered: Dec 2009
Distribution: Slackware 13
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for the replies,

After another 2 days of research I chose FLTK. GTK and Qt are good for writing apps to be widely distributed. I need a light GUI front end controller for a heavy back-end processing app that will only be used on one machine. FLTK seems to be perfect for that.
 
  


Reply

Tags
development, fluxbox, gui



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How Cairo library works? ~Linux_user~ Programming 1 12-20-2008 10:24 AM
Writing GUI front-ends: what language + what GUI library? pear Programming 7 07-07-2008 08:17 AM
Cross platform C GUI library? Akabaka Programming 5 04-02-2006 10:11 PM
aterm -bl works in KDE, not in fluxbox kersten78 Linux - Software 9 10-16-2004 03:20 PM
What GUI library should i use? Zootropo Programming 2 01-05-2004 10:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration