What GUI library do people recommend.


Godmil

Active Member
Joined
May 6, 2006
Messages
585
Website
www.godmil.com
I've been learning C++ for nearly a year now, but I've put off using GUIs because I can't decide which library to use.  I don't have a lot of learning time so I don't want to spend ages on something that I later decide was a mistake.

I've tried GTK+, and found there were lots of good tutorials, however the actual use of it I found horrible and cumbersome (Which I'm putting down to it being natively C).

I liked the idea of wxWidget, but I found it difficult to find good tutorials.

I recently tried Qt and thought it was a revelation, really easy to understand, lots of good tutorials... however when I tried to run a wee app outside of my development environment I hit a brick wall.  I just couldn't find every DLL that I needed to have sitting beside the app, and some of them were 45+Meg  (which is way too big) - and the tutorials for static linking are just way over my head.

I'm mainly on Windows (using codeblocks & mingw), but hoping in the future to do stuff on Pandora too.  Also I use a lot of SDL at the moment, and would love to have a nice window with tool bars that could have SDL running in it (which I don't think is possible with Qt).

So what do people recommend, is it worth forcing myself to just deal with how GTK works, or should I persevere getting static linking in Qt, or can anyone recommend a good wxWidget tutorial series? or are any of those options a bad idea for Pandora?

Any tips would be greatly appreciated.
 
Since you're already using Code::Blocks, using wxWidgets isn't a bad idea, imo. CB has wxSmith implemented as GUI designer, which makes working with wx pretty comfortable.
I've also just recently started with it, here are some links where I learned how to use it:
http://wiki.codeblocks.org/index.php?title=WxSmith_tutorials
http://docs.wxwidgets.org/2.9/page_topics.html
http://wiki.wxwidgets.org/Guides_%26_Tutorials

About SDL integration... I read somewhere that it might be possible to have a SDL window part of your wxApp, but I'm not sure if you can add stuff like menus and toolbars to it.
wxWidgets offers mutliple ways to do your own rendering, though. For simple ones without alpha wxDC, for alpha support you can use wxGraphicsContext (which seems to be quite new, but works for me just fine) or if you need hardware acceleration you can also use an OpenGL context(unsure if that would work on the Pandora, maybe with libGL).

wxWidgets runs fine on the Pandora, the Code::Blocks PND also comes bundled with it, but with an older 2.8x version.


Can't say much about your other options, for me wxWidgets is a GUI library(it also has lots non-GUI features that could help you a lot) how I wanted it, so I didn't feel the need to look at the others yet.
 
I've tried GTK+, and found there were lots of good tutorials, however the actual use of it I found horrible and cumbersome (Which I'm putting down to it being natively C).
So what about the official (separate) C++ bindings, gtkmm?
 
I'd love to use .NET/Mono, but I never managed to get the copy of Mono hidden in Banshee to run any of my applications (I assume I was doing something wrong).

I do like Qt, but I've never actually managed to complete a project in it (that's probably more to do with me than Qt). Could you not just provide a link for your users to download the Qt runtime rather than trying to bundle all the DLLs in your app? It's also possible that you're looking at debug versions of the DLLs, which will be bloated with debugging symbols etc.

I have started with wxWidgets on my latest PIM project, and that seem to be okay so far, but not really got into the nitty-gritty yet.
 
I recently tried Qt and thought it was a revelation, really easy to understand, lots of good tutorials... however when I tried to run a wee app outside of my development environment I hit a brick wall. I just couldn't find every DLL that I needed to have sitting beside the app, and some of them were 45+Meg (which is way too big) - and the tutorials for static linking are just way over my head.
The installer of KDE for windows will bring you all the requiered libraries for windows devel (http://windows.kde.org/download.php).
C::B PND allow you to build QT application with qt creator. So does yactfeau. For producing the PND you'll need to include qt libraries in the PND, but some PNDs already does that, you'll just have to steal them ;)
 
OK, thanks very much for the advice.  I tried giving wxWidget another go, but I just really suck at reading tutorials, I learn much better with video tutorials, for which there are very few... but TONS of great Qt ones... so I checked out what pmprog said, and he was right, I was trying to compile a massive list of debug dlls (seriously hundreds of meg for a simple notepad test program).  So I've got Qt working again and I think I'll stick with it, and give up any hopes of combining SDL with it. the Qt editor is just sooo nice.

Thanks guys, I was totally stuck in a rut, now I've got tons of cool stuff to learn :D
 
the Qt editor is just sooo nice.
I think the text editor side of it is really amazing. I'm not even sure what it is about it, but it's a shame I can't use it for general C/C++ projects too.
 
I'v worked a lot of years ago with QT (when it was version 3 ;) ) and some years ago with wxWidgets. From what I remember they share(d ?) the same basic concept.

The best link i can give you now is http://docs.wxwidgets.org/trunk/index.html and http://docs.wxwidgets.org/trunk/page_samples.html . There was also a third party widget page somewhere on sourceforge, but i can't find the link right now.

I liked wxWidgets, but it had some quirks here and there. But maybe it got better. I also liked QT at the time of using it. What I've always missed most was a widget editor, which I think is available for QT now. Because "designing" windows and dialogs by code is PITA :)
 
Yeah, I'd like something to help me build the wxWidgets UI code for my PIM. That said, I think I'm making some reasonably nice progress by hand, even if it does get a bit trial and error :)
 
Why not? I use it all the time for non-Qt projects.
Because QtCreator doesn't let me select a non-Qt project. Here are the options it gives me:
Qt Quick Project

----------------

Qt Quick Application

Qt Quick UI

Custom QML Extension Plugin

Qt Widget Project

-----------------

Qt Gui Application

Mobile Qt Application

Other Project

-------------

Qt Console Application

C++ Library (still based on qmake)

Qt Unit Test

Qt Custom Designer Widget

HTML5 Application

Qt Creator Plugin

Empty Qt Project (still qmake based)

Subdirs Project (still qmake based)

So unless I misunderstand that you can use qmake without Qt, there are no options
 
I'm not sure how to make a CMake project, but I'll have a look at the weekend. If that works, that would be pretty sweet. Cheers
 
As someone who did big projects in wxWidgets and Qt, I can say for sure: Qt is much better, is better supported in all platforms (wx on Mac have a lot of problems), and wx is somewhat "hacky", Qt's api is much cleaner.
 
Back
Top