What's A Good Ui Library?


Samurai_Crow said:
If you're looking for something SDL-based, look at the Agar library. You'll do fine with wxWidgets also but it generally layers itself on top of another GUI library in the system used thus taking up extra RAM. QT is also good if it is already being used elsewhere in the system, otherwise leave it. GTK+ is ok too if it is used elsewhere in the system. Most Linux systems use either QT/KDE, Gnome/GTK+, or XFCE so just find out which GUI system is used by the base system for Angstrom and use that.

Most videos we've seen of Pandora running Linux have used the Enlightenment Destop, so maybe it's good to look at the EFL for GUI coding. I'll back up your Agar suggestion though, if the OP is creating a simple GUI then Qt seems like overkill. What is the size of a typical Qt .so?
 
Last edited by a moderator:
Zeno Arrow said:
Samurai_Crow said:
If you're looking for something SDL-based, look at the Agar library. You'll do fine with wxWidgets also but it generally layers itself on top of another GUI library in the system used thus taking up extra RAM. QT is also good if it is already being used elsewhere in the system, otherwise leave it. GTK+ is ok too if it is used elsewhere in the system. Most Linux systems use either QT/KDE, Gnome/GTK+, or XFCE so just find out which GUI system is used by the base system for Angstrom and use that.

Most videos we've seen of Pandora running Linux have used the Enlightenment Destop, so maybe it's good to look at the EFL for GUI coding. I'll back up your Agar suggestion though, if the OP is creating a simple GUI then Qt seems like overkill. What is the size of a typical Qt .so?
The core library is 2.3 MiB (desktop version), and it will load additional libraries on demand. An important thing to note is that the Qt core libs contain the built-in themes, also, so the size of the GUI library can be up to 10 MiB depending on configuration. Qt-embedded is tiny, though; don't have access to it, however.

EFL is very nice indeed, but since the most popular widget libraries are Qt and GTK, I think we should try to use them unless we want specific features from other toolkits. That way, users at least have a chance of creating some kind of uniform look and feel on the Pandora. It's not like there will be memory problems if we load Qt; it's only about 10 MiB of shared data. The Pandora isn't a mobile phone, or some ancient P3 computer, y'know.
 
Last edited by a moderator:
dflemstr said:
The core library is 2.3 MiB (desktop version), and it will load additional libraries on demand. An important thing to note is that the Qt core libs contain the built-in themes, also, so the size of the GUI library can be up to 10 MiB depending on configuration. Qt-embedded is tiny, though; don't have access to it, however.

That is smaller than I expected.

dflemstr said:
EFL is very nice indeed, but since the most popular widget libraries are Qt and GTK, I think we should try to use them unless we want specific features from other toolkits. That way, users at least have a chance of creating some kind of uniform look and feel on the Pandora. It's not like there will be memory problems if we load Qt; it's only about 10 MiB of shared data. The Pandora isn't a mobile phone, or some ancient P3 computer, y'know.

You're thinking about the problem the wrong way. A better question than 'why can't we use a 10MiB library?' is 'why use a 10MiB library when I can build a GUI using a smaller library?'. I dislike code bloat, it's nothing to do with whether the Pandora will be able to run Qt (as it clearly will) but rather why use it if another library does the same job with less resources. I like the idea of Qt Creator, certainly, but other than that what does Qt offer over, let's say the Agar library, for building simple GUIs? Does it have any hooks for GPU acceleration for example?
 
Last edited by a moderator:
Zeno Arrow said:
You're thinking about the problem the wrong way. A better question than 'why can't we use a 10MiB library?' is 'why use a 10MiB library when I can build a GUI using a smaller library?'. I dislike code bloat, it's nothing to do with whether the Pandora will be able to run Qt (as it clearly will) but rather why use it if another library does the same job with less resources. I like the idea of Qt Creator, certainly, but other than that what does Qt offer over, let's say the Agar library, for building simple GUIs? Does it have any hooks for GPU acceleration for example?
Well, for one, I think that it's much easier to use Qt for applications, because Qt not only offers GUI libraries, but also everything from web page rendering to basic audio playback to OpenGL stuff to XML processing, all in one integrated package, so you won't have to create tedious wrapper and abstraction libraries to glue, say, libxml, Gecko, and GTK together just to create a basic web browser. I don't think that there are situations when you only want to use a GUI library and nothing else; you'll always be in need of some other thing, and often enough, that other thing is provided in some shape or form by Qt. Also, you'll be able to blame any problems on the Qt guys if something goes wrong, which certainly isn't possible if you roll your own integration libs. Finally, since there literally are thousands of projects using Qt, you can be sure of the fact that it has a solid and well-organized, streamlined and optimized code base, something that isn't true about some of the more "lightweight" libraries out there.

And Qt uses GPU acceleration to draw it's stuff. It has access to Cairo and Clutter (with the correct build flags) EDIT: and also XRender and pure OpenGL it seems, after all. Note, though, that it sometimes isn't energy efficient to draw everything with the GPU; normal rasterization can sometimes be preferred.
 
Last edited by a moderator:
@dflemstr
Fair enough, seems like Qt is flexible and powerful. I can still think of times when you only need a simple GUI but when you need a bit more Qt seems like a logical choice.
 
For work we switched from Qt to fltk2. Much smaller footprint, very good control over events, clever paradigm, very orthogonal. And oh yeah, faster and more responsive.

Lot of embedded users. Unfortunately its missing good layout, however once you understand the fktk way its very manageable. One of these days I'll may take a shot at some layout which would be purely initial layout only (fltk::Group actually is quite good once you understand how to use it).
 
Zeno Arrow said:
I like the idea of Qt Creator, certainly, but other than that what does Qt offer over, let's say the Agar library, for building simple GUIs? Does it have any hooks for GPU acceleration for example?

Qt's rendering API is called QPainter, which has multiple backends. The idea is that you can write your application using standard QPainter and Qt will use the most optimal rendering back-end available. Qt added a new back-end for OpenGL ES 2.0 with the 4.5 release, which is getting significant improvements in 4.6. I know, as I wrote it. :rolleyes:

Although I may be a little biased :))), I do think the rendering engine is pretty advanced. It uses a kindof runtime code generation where it emits shader code optimised for the rendering operation being performed at the time. So, if your using QPainter to render a convex path with a semi-transparent radial gradient and have an affine transformation set, it will generate a set of shaders optimised for that exact operation (and cache it ready for next time). Although the engine works on any OpenGL ES 2.0 implementation, it was written & optimised for the PowerVR SGX in the OMAP3, so I'm hoping it will run very well on the Pandora.
 
Last edited by a moderator:
wardred said:
Tom,
Though I don't know what all of that means, it definitely sounds cool, and if it's written for the OMAP3 then it should run well on the Pandora.
I would rather say that this is the kind of technology that should make you not use GTK, ever :p

(Granted, GTK has Clutter, but it's not being used as extensively as it could be)

Oh and Qt is written for a very high number of platforms, and it's in no way OMAP3-specific. Maemo uses it, for example, and you can even run it on Haiku...
 
Last edited by a moderator:
You don't want all this new-fangled Qt/GTK stuff.

Motif is still hard to beat for size, configurability and ease of programming.

Looks shit though :)
 
Parkydr said:
You don't want all this new-fangled Qt/GTK stuff.

Motif is still hard to beat for size, configurability and ease of programming.

Looks shit though :)
Well, problem is that Motif is *slower* than Qt in some situations, because Motif just rasterizes the GUI elements. For small GUIs, however, I have no doubt that Motif has better performance than Qt.
 
Last edited by a moderator:
Back
Top