Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Cross platform GUI toolkit


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
15 replies to this topic

#1 cignox1   Members   -  Reputation: 723

Like
0Likes
Like

Posted 29 December 2011 - 06:25 PM

Hi all, I'm currently thinking to start a new spare time project, and would like to have advices about which GUI toolkit could fit my needs. Up to now, I've considered Qt and wxWidgets, but I'm looking for something more lightweight (if such thing exists). To be honest, I've already tried to set up wxWidgets on Eclipse without luck, so perhaps it is not really what I want :-(

Requirements:
-Should be available on windows and linux (mac would be a welcome plus)
-Lightweight and easy to both install and use (no much time to spend on the project, and would rather spend it on the core than the GUI)
-Based on standard c++

Bonus:
-Python bindings (I might want to add scripting capabilities)
-OpenGL support

Not required:
-I don't need it to look like a native app (no host widgets used under the hood required), as long as all common widgets are provided and the interface is nice to look at.
-I don't need the toolkit to provide other facilities (network/threads/sound/database...): boost and other tools are good enough, and probably even better, and I don't need many other features anyway, since it would be an image manipulation app.

I could consider to use Java, but I'm going to do quite intensive image processing and there are wonderful c/c++ libraries which could help (FreeImage and the like) not to mention the performance issues.
I'm open to suggestions on this as well, though, if you think that a good option would be another language (that is Java: no python, as I'm not good enough with it, and no c#, since .net is only theoretically cross platform :-)

There could be more to say, but let's start with that. Any advice?

Thank you all!

Sponsor:

#2 Promit   Moderators   -  Reputation: 7671

Like
0Likes
Like

Posted 29 December 2011 - 07:05 PM

If Python bindings are important to you, then that throws a lot of weight behind wxWidgets...

#3 e‍dd   Members   -  Reputation: 2105

Like
0Likes
Like

Posted 29 December 2011 - 07:46 PM

If Python bindings are important to you, then that throws a lot of weight behind wxWidgets...

Though there are also reasonably mature bindings for Qt, too. I can't contrast it to wxWidgets as I've never used that library, in or out of Python.

cignox1: depending on how lightweight you really want it, simply using glut/freeglut might be an option. There's stuff for menu bars, context menus, etc, and it's pretty easy to hack together some basic buttons with OpenGL. I fear the reality of the situation is that all the mature GUI libraries do indeed come with a lot of other baggage, due to a combination of N.I.H syndrome, their age/legacy, cross platform support, etc

#4 Bearhugger   Members   -  Reputation: 570

Like
0Likes
Like

Posted 29 December 2011 - 08:55 PM

Unfortunately there's not a lot of choices for cross-platform GUI toolkits if you want to restrict yourself to C/C++. Not sure why exactly, my best guess is that Java has covered the cross-platform requirement for quite a while now.

+1 for wxWidgets here too. Qt is advertised as a GUI toolkit but it has grown into an entire framework, so it's ridiculously heavy if you just want a basic interface. I'm not a fan of Qt for this and a couple other reasons to be quite honest.

As for Python bindings, I'm pretty sure there are bindings for both wx and Qt. I remember doing Qt/KDE programming in Python when I was using a Linux operating system. (Unless I'm being mistaken with Ruby programming.)

#5 jwezorek   Crossbones+   -  Reputation: 1986

Like
0Likes
Like

Posted 29 December 2011 - 10:37 PM

There's also Juce ... which has a lot of nice features e.g. embedding cross-platform image resources. No python bindings as far as I know however (There is a PyJuce project but it doesn't look like it is alive)

#6 Misery   Members   -  Reputation: 317

Like
1Likes
Like

Posted 30 December 2011 - 04:05 AM

If You care about python embedding and GUI, why not to try to create the whole app in Python, and just make the speed critical parts in C++? There are many GUI tools for python, also "built in" in standard python modules, so maybe it is a way to achieve Your goal? And Python is cross-platform by definition, so it could solve a lot of problems at the very beginnig.

#7 cignox1   Members   -  Reputation: 723

Like
0Likes
Like

Posted 30 December 2011 - 05:39 AM

Thank you all for your advices.

Unfortunately there's not a lot of choices for cross-platform GUI toolkits if you want to restrict yourself to C/C++. Not sure why exactly, my best guess is that Java has covered the cross-platform requirement for quite a while now.


I don't refuse to consider more options: indeed, working with java would be perhaps more pleaseant and it would simplify implementing a plugin system, should I ever reach that point. I could do a deeper search to check if libraries to handle images i/o exist, expecially for HDR and other non web related formats.

If You care about python embedding and GUI, why not to try to create the whole app in Python, and just make the speed critical parts in C++?


I'm not good enought with phyton to even consider it as a viable option. The only reason to have python bindings is that once the app core is completed, it would be nice to allow for extensions.
That said, it does not hurt to give it a look to see if with the right IDE (and a GUI designer) I can change my mind :-)

I though to add a word about the license I need: as I don't have any idea about what I will do with the code, I would like to be left free to make a decision later in the process, so no GPL. LGPL would be OK though, I suppose. Both wxWidgets and Qt satisfy that requirement (and of course Java and Python do).

#8 cignox1   Members   -  Reputation: 723

Like
0Likes
Like

Posted 30 December 2011 - 04:53 PM

OK, I've given a look to two more options:
-Java: I have been unable to find a good image input/output library supporting common image formats suitable for graphic image manipulation, something similar to FreeImages or DevIL. Any advice on this?
-FLTK for c++ as a GUI toolkit. Any opinion to share about that lib?

#9 Bregma   Crossbones+   -  Reputation: 5498

Like
0Likes
Like

Posted 30 December 2011 - 07:54 PM

I would recommend Qt. It works on all the desktops and most mobile and embedded platforms. It is skinnable. It has well-supported Python and C++ bindings. It is a collection of libraries, so if all you want is GUI all you use is the GUI and the Core libraries, but other things like threads, networking, OpenGL, XML,multimedia, and others are there and well integrated if you want to use them. It's small, fast, mature, professional, commercially supported, and under active development. It just works.

Qt also has QML, and ECMAScript-like language for contemporary software development style, so you can engage in current development modes as well as legacy C++ ones.
Stephen M. Webb
Professional Free Software Developer

#10 Matt-D   Crossbones+   -  Reputation: 1469

Like
1Likes
Like

Posted 31 December 2011 - 01:47 PM

FLTK definitely satisfies the lightweight part.

Although you should be careful when choosing its version:
http://en.wikipedia.org/wiki/FLTK#Versions

There a multiple examples of using FLTK with OpenGL:
https://www.google.com/search?q=fltk+opengl

As for Python bindings, see:
http://pyfltk.sourceforge.net/
http://www.fltk.org/wiki.php?LC+P139+TC+Q

#11 Aardvajk   Crossbones+   -  Reputation: 6255

Like
0Likes
Like

Posted 02 January 2012 - 08:29 AM

Another Qt fan here - yes it is heavyweight but a) you can just link to the libraries you need and b) if you want cross-platform, you'll end up having to find cross-platform alternatives for a lot of stuff other than GUI which Qt provides a plethora of.

Plus I don't think I could ever go back to GUI design in C++ without Qt's signals/slots and metaobject system.

#12 Serapth   Crossbones+   -  Reputation: 5792

Like
0Likes
Like

Posted 02 January 2012 - 01:08 PM

No recommendations for GTK?

I personally have no experience, only recently looked at it as an option for cross platform C# development ( as it's the preferred gui kit for Mono ); but I figured it would have a proponent or two here.

I only recently started working with Qt, but frankly its bigness is to a degree a strength, as it makes up for the otherwise abysmally lacking C++ standard libraries. When I'm used to working with the .NET Framework libraries, having something like Qt is extremely refreshing.

#13 cignox1   Members   -  Reputation: 723

Like
0Likes
Like

Posted 03 January 2012 - 04:15 AM

I have been finally able to compile a sample application using wxWidgets, That does not mean that I'm over with search, I could give a second look to Qt (thought its size is HUGE) and FLTK.

@Serapth: I've also considered GTK, but as far as I know it is C, not C++, and after several years of C# and Java I don't feel like going back to non OO interfaces.

#14 jeroenb   Members   -  Reputation: 257

Like
0Likes
Like

Posted 03 January 2012 - 01:09 PM

I have only used Qt in the past for a single application, so I can not tell to much about it. Although it is pretty big, it comes with all kinds of handy stuff you no longer have to write yourself. It has a nice wiziwig UI designer which supports the events (you can even write the whole application in one of their apps). Advantage is that multi-language has been integrated pretty well, quite easy to learn and lots of libraries cross platform available. Disadvantage I found with Qt was that I had to compile the UI and some other file type everytime it changed.

Crafter 2D: the open source 2D game framework

Blog: Crafter 2D
Twitter: @crafter_2d


#15 SymLinked   Members   -  Reputation: 888

Like
0Likes
Like

Posted 03 January 2012 - 02:29 PM

I used Qt for several years. On your harddrive it's huge (they use some custom meta-object compiler for some of their code and it's large), but you can select what libraries to link with. It's really slick and works really well.

I had to move away from it though as I had to release a commercial application with it and the license prohibits that unless you purchase it.
Now I'm using wxWidgets. The difference is clear. After a few weeks of usage I run into broken widgets (wxListCtrl not callbacking on selection changes in Win32 but does on Linux, to pick an example..) and I have to work around the broken stuff but overall it works. It's dockable windows features are not as solid, easy to use or nice-looking as Qt's but it's still free. Which is important too. I do not regret my choice.

#16 brx   Members   -  Reputation: 720

Like
0Likes
Like

Posted 04 January 2012 - 02:41 AM

+1 for Qt. I've been using Qt for several years and really love it. Not only is the library itself beautifully structured (imho), the documentation is great, too.

I had to move away from it though as I had to release a commercial application with it and the license prohibits that unless you purchase it.

Actually, Qt can be used under the terms of the LGPL, so you are allowed to release commercial applications with it without buying. The only advantage you get from buying it is the additional support you get and the right to distribute your application with Qt linked statically.

#17 SymLinked   Members   -  Reputation: 888

Like
0Likes
Like

Posted 05 January 2012 - 01:51 AM

+1 for Qt. I've been using Qt for several years and really love it. Not only is the library itself beautifully structured (imho), the documentation is great, too.


I had to move away from it though as I had to release a commercial application with it and the license prohibits that unless you purchase it.

Actually, Qt can be used under the terms of the LGPL, so you are allowed to release commercial applications with it without buying. The only advantage you get from buying it is the additional support you get and the right to distribute your application with Qt linked statically.


This is true of course, and another reason was that I couldn't use dynamic linking. At the time of posting I didn't seem to be able to edit my post, but now it works so I'll make sure I edit that in that to avoid any confusion. Thanks!

Agreed about their documentation.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS