Thread: GUI Programming

  1. #1
    Registered User
    Join Date
    Aug 2005
    Posts
    204

    GUI Programming

    As far as I know, there are many ways to program GUIs in C++. If I'm not mistaken, it will also vary greatly from one platform to another. Are GUI programming skills that are useful on one platform also useful on other platforms? Do the different GUI libraries bear a similarity to one another?

  2. #2
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    They only vary from one platform to another if you chose the native operating system's API for a GUI. if you use a multi platform library such as wxWidgets you can develop a gui on windows and then later compile it on linux and have it work for either.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    As Indigo0086 said, the native API varies from one platform to another. There are libraries that allow you to use a "common" high-level API, which means that you can move an application (assuming the REST of the application is written in a portable way) from Windows to Linux/Solaris or MacOSX.

    But if you know how to do GUI apps on one platform, you have a MUCH better understanding of things, than someone who is a complete beginner of GUI programming.

    I'm not a GUI programmer (I can do SIMPLE GUI stuff, but nothing fancy), but I know enough to know that if you can come up with a good stuff on Windows, it will take MUCH less effort to come up with the same thing on Linux, than it would if you know "nothing" about GUI design and implementation.

    [In case someone wonders, I've done lots of low-level programming in drivers, OS's and embeded - but none of that involves GUI in the normal sense - some of my drivers have been drawing GUI to the display tho']

    --
    Mats

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    another famous cross-platform, opensource GUI lib, besides WxWidgets, is Qt. Its windows version has just been GPL-ed and made free (as in $) to windows developers using mingw, but its Linux version has been heavily used and tested for many years. Besides GUI, Qt also provides cross-platform interfaces to socket networking, threading, etc.

  5. #5
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    I hear good things of Qt, is it compatiable with openGL? The only thing keepign me from it was that it wasn't free.

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    The Trolltech website claims that Qt has OpenGL integration.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    yes, OpenGL is integrated into Qt. At the same time, you can use Qt to do key handling etc.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    The only thing keepign me from it was that it wasn't free
    well, it's under the GPL, not a BSD-styled license, meaning that, if I understood correctly, your code that uses Qt has to be licenced under the GPL (opensource), too. And if you want to do commercial development, you will have to use the paid version.

    Also, note that the free windows version of Qt can only be used with mingw (gcc) and not visual studio because of some strange logic I don't understand.

  9. #9
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    WxWidgets is less restrictive. However my very limited experience with it revealed that probably MinGW is not the best compiler to use with it. The library was huge (particularly the debug versions which are essential during the development phase). I'd suggest WxWidgets with Visual C++ 2005.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert Windows GUI to Linux GUI
    By BobS0327 in forum Linux Programming
    Replies: 21
    Last Post: 11-27-2005, 04:39 AM
  2. .NET And GUI Programming :: C++
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 01-27-2002, 04:22 PM
  3. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 03:22 PM
  4. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 08:03 PM
  5. GUI (Graphical User Interface) Help Needed
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 10-11-2001, 10:35 AM