c++ guis

Discussion in 'C++' started by Robin, Dec 30, 2010.

  1. Robin

    Robin Guest

    anyone know where I can get new c++ gui libs....

    it would be a good idea to design some.

    -r
     
    Robin, Dec 30, 2010
    #1
    1. Advertising

  2. Robin

    Öö Tiib Guest

    On Dec 30, 1:16 pm, Robin <> wrote:
    > anyone know where I can get new c++ gui libs....
    >
    > it would be a good idea to design some.


    C++ language does not have GUI libs. GUI libs are often platform
    specific, so you have to tell your platform when making such request.

    There are some GUI frameworks that work on lot of platforms. For
    example one highly popular cross-plaform GUI framework is QT. See
    http://qt.nokia.com/ for more information. It is quite large framework
    so it may take you months to find out if you like it or not.
     
    Öö Tiib, Dec 30, 2010
    #2
    1. Advertising

  3. Robin

    Dombo Guest

    Op 30-Dec-10 12:35, Öö Tiib schreef:
    > On Dec 30, 1:16 pm, Robin<> wrote:
    >> anyone know where I can get new c++ gui libs....
    >>
    >> it would be a good idea to design some.

    >
    > C++ language does not have GUI libs. GUI libs are often platform
    > specific, so you have to tell your platform when making such request.
    >
    > There are some GUI frameworks that work on lot of platforms. For
    > example one highly popular cross-plaform GUI framework is QT. See
    > http://qt.nokia.com/ for more information. It is quite large framework
    > so it may take you months to find out if you like it or not.



    Other examples are:
    wxWidgets: http://www.wxwidgets.org/
    FLTK: http://www.fltk.org/
    GTK+: http://www.gtk.org/
    FOX Toolkit: http://www.fox-toolkit.org/
    MFC: http://msdn.microsoft.com/en-us/library/d06h2x6e(VS.80).aspx

    In other words: there is no need to design yet another C++ GUI
    toolkit/library yourself.
     
    Dombo, Dec 30, 2010
    #3
  4. Robin

    Felix Bytow Guest

    Felix Bytow, Dec 30, 2010
    #4
  5. Robin

    Dombo Guest

    Op 30-Dec-10 13:37, Felix Bytow schreef:
    > Am 30.12.2010 12:52, schrieb Dombo:
    >> Other examples are:
    >> wxWidgets: http://www.wxwidgets.org/
    >> FLTK: http://www.fltk.org/
    >> GTK+: http://www.gtk.org/
    >> FOX Toolkit: http://www.fox-toolkit.org/
    >> MFC: http://msdn.microsoft.com/en-us/library/d06h2x6e(VS.80).aspx

    >
    > ofcourse MFC is not cross-platform so I would not suggest this library.
    > also it is Microsoft specific and usable oonly with a bought Microsoft
    > Visual Studio.
    > The Express Version of Microsoft Visual C++ does not include MFC.


    The OP did not state that he required a cross-platform solution nor
    which development environment he is using. In organisations that develop
    for the Windows platform typically use (a non-Express edition of)
    Microsoft Visual Studio.

    That being said there was reason why I put MFC at the bottom of the
    list; besides the issues you mentioned there are other reasons why MFC
    wouldn't be my first choice. Unfortunately I know of no C++ GUI
    library/toolkit which I would recommend without reservations.
     
    Dombo, Dec 30, 2010
    #5
  6. Robin

    Balog Pal Guest

    "Cholo Lennon" <>
    > Take a look to:
    >
    > http://www.free-soft.org/guitool/
    >
    > The site has a complete list of gui libraries


    Fine list, though after it marks gtk as 'good' I wouldn't take
    qualifications seriously.
     
    Balog Pal, Dec 30, 2010
    #6
  7. On Dec 30, 8:12 am, Dombo <> wrote:
    > Op 30-Dec-10 13:37, Felix Bytow schreef:
    > > Am 30.12.2010 12:52, schrieb Dombo:
    > >> Other examples are:
    > >> wxWidgets:http://www.wxwidgets.org/
    > >> FLTK:http://www.fltk.org/
    > >> GTK+:http://www.gtk.org/
    > >> FOX Toolkit:http://www.fox-toolkit.org/
    > >> MFC:http://msdn.microsoft.com/en-us/library/d06h2x6e(VS.80).aspx

    >
    > > ofcourse MFC is not cross-platform so I would not suggest this library.
    > > also it is Microsoft specific and usable oonly with a bought Microsoft
    > > Visual Studio.
    > > The Express Version of Microsoft Visual C++ does not include MFC.

    >
    > The OP did not state that he required a cross-platform solution nor
    > which development environment he is using. In organisations that develop
    > for the Windows platform typically use (a non-Express edition of)
    > Microsoft Visual Studio.
    >
    > That being said there was reason why I put MFC at the bottom of the
    > list; besides the issues you mentioned there are other reasons why MFC
    > wouldn't be my first choice. Unfortunately I know of no C++ GUI
    > library/toolkit which I would recommend without reservations.


    What are your specific reservations with Qt?

    Thanks!

    KHD
     
    Keith H Duggar, Dec 30, 2010
    #7
  8. Robin

    Richard Guest

    [Please do not mail me a copy of your followup]

    Christian Hackl <> spake the secret code
    <ifhv3e$hke$-september.org> thusly:

    >wxWidgets certainly has its share of problems, but in the end it's just
    >good enough, and that's all you can ask of a GUI library.


    I've used wxWidgets and Qt. I prefer wxWidgets.
    --
    "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
    <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

    Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
     
    Richard, Dec 30, 2010
    #8
  9. Robin

    Richard Guest

    [Please do not mail me a copy of your followup]

    Keith H Duggar <> spake the secret code
    <> thusly:

    >What are your specific reservations with Qt?


    I've worked on a very large application which used Qt extensively.

    From a look-and-feel perspective, my reservations with Qt are that it
    doesn't use anything from the platform and reinvents all look and feel
    itself. That means that on all platforms its just slightly wrong.
    Now that I know this about Qt, I can typically spot a Qt application
    just by looking at it. They talk about how you can run a Qt
    application with a command-line argument to get a Mac look and feel on
    Windows. They talk about this as if it were a feature, but seriously
    if you're on Windows you want things to look like Windows, not like a
    Mac and vice-versa. This is more of a side-effect of them
    reimplementing/immitating the look and feel of the platforms they
    support, not a feature.

    Because Qt reimplements everything itself, including event
    dispatching, widgets, rendering, etc., it is a very large and complex
    code base. Amazgingly, it ships with zero unit tests and there isn't
    any indication that they have a suite of unit tests that they use
    internally, so that implies that everything is hand tested when new
    releases come out. This explains why major new releases are full of
    problems when they come out.

    Looking through the code base, I'm rather horrified. I've seen a
    tendency to use reinterpret_cast<> to just "jam it in" all throughout
    their code. If we had a program that could enumerate all the
    instances of undefined behavior in a C++ source application, I'm
    willing to bet there would be hundreds if not thousands of instances
    throughout the Qt code base.

    The documentation can also get a bit sketchy. Since they reimplement
    all UI behavior themselves, you can't rely on the platform's UI
    behavior documentation. Documentation and books on Qt will tell you
    that two ways of doing things are equivalent and from the implied
    semantics of the methods, you'd draw that conclusion as well.
    However, in reality they are not equivalent and one will work and the
    other won't. There's no way to know which will work and which won't
    work without finding out the hard way.

    Their widget layout system is complex and featureful. This may seem
    like a good thing, but in practice it means that you have to tread
    carefully when doing complex layouts of widgets. Two seemingly
    equivalent layotu incantations produce different results, so there is
    a lot of iterating through layout incantations in order to find the
    proper one.

    Some people don't like the moc preprocessor thing and while that
    never particularly bothered me, it does have some implementation
    downsides. The names of signals and slots are just turned into
    strings, so there isn't any static type checking on them. You can
    easily have a bug because you have a typo in a signal name or a slot
    name and you won't find out until you test things manually.

    Their unit test frame work that they introduced in Qt4 sucks ass.

    I could probably come up with some more things if I thought about it
    more, but that's what I remember off the top of my head since I last
    worked on this application about a year ago.
    --
    "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
    <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

    Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
     
    Richard, Dec 30, 2010
    #9
  10. Robin

    Richard Guest

    [Please do not mail me a copy of your followup]

    Dombo <> spake the secret code
    <4d1c7281$0$30705$> thusly:

    >Other examples are:
    >wxWidgets: http://www.wxwidgets.org/
    >FLTK: http://www.fltk.org/
    >GTK+: http://www.gtk.org/
    >FOX Toolkit: http://www.fox-toolkit.org/
    >MFC: http://msdn.microsoft.com/en-us/library/d06h2x6e(VS.80).aspx


    WTL is a free, open source alternative for Windows platforms.
    <http://en.wikipedia.org/wiki/WTL> Unfortunately it depends on ATL
    for some things, and I don't think ATL is available for use with the
    Express editions of Visual Studio.

    Still, WTL is a nice C++ style library for accessing the underlying
    Win32 API stuff and using the controls that exist. It allows you to
    create very small GUI applications, just like ATL allows you to create
    very small COM objects. It has its strengths and its weaknesses and
    its not for everyone, but for those of you that like things small and
    efficient, I'd recommend looking at it.
    --
    "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
    <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

    Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
     
    Richard, Dec 30, 2010
    #10
  11. Robin

    Jorgen Grahn Guest

    On Thu, 2010-12-30, Balog Pal wrote:
    > "Cholo Lennon" <>
    >> Take a look to:
    >>
    >> http://www.free-soft.org/guitool/
    >>
    >> The site has a complete list of gui libraries

    >
    > Fine list, though after it marks gtk as 'good' I wouldn't take
    > qualifications seriously.


    Surely for each GUI toolkit out there you can find someone who hates it.

    But I *do* agree that those "good" tags with no rationale or explanation
    show some ... lack of judgement.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
     
    Jorgen Grahn, Dec 30, 2010
    #11
  12. Richard wrote:

    > [Please do not mail me a copy of your followup]
    >
    > Keith H Duggar <> spake the secret code
    > <> thusly:
    >
    >>What are your specific reservations with Qt?

    >
    > I've worked on a very large application which used Qt extensively.
    >
    > From a look-and-feel perspective, my reservations with Qt are that it
    > doesn't use anything from the platform and reinvents all look and feel
    > itself. That means that on all platforms its just slightly wrong.


    Why do you think so? Qt applications look perfectly fine under KDE. :p

    IMHO, the problem with Qt is that it's showing its age and that it tries to
    do too many things. I'm not aware of any modern idiosyncratic C++ GUI
    toolkit. It seems that most are merely wrappers for other toolkits. I fear a
    project to build such a beast is in great danger of the second system
    effect. :-( Designing GUIs is hard, I can only imagine that designing GUI
    toolkits is even harder.
     
    Paul Brettschneider, Dec 30, 2010
    #12
  13. Robin

    Balog Pal Guest

    "Paul Brettschneider" <>
    > effect. :-( Designing GUIs is hard, I can only imagine that designing GUI
    > toolkits is even harder.


    It definitely is. Especially if done on the arrogant/coolguy way, not
    learning ins and outs of the already existing stuff to collect the benefits
    and avoid what was proven wrong in practice.
     
    Balog Pal, Dec 30, 2010
    #13
  14. Robin

    Richard Guest

    [Please do not mail me a copy of your followup]

    Paul Brettschneider <> spake the secret code
    <69b5c$4d1cdbfd$506c0d9c$> thusly:

    >IMHO, the problem with Qt is that it's showing its age and that it tries to
    >do too many things.


    This seems to be the end result of any library that attemps to address
    "the platform". Both wxWidgets and Qt try to address the entire
    platform of services and not just GUI services. For instance, they
    both have mechanisms of dealing with the file system and sockets, two
    things that don't have anything to do with the UI.

    >[...] Designing GUIs is hard, I can only imagine that designing GUI
    >toolkits is even harder.


    Agreed. Its also true that what programmers expect from their GUI
    toolkit isn't a fixed target; its an evolving target. Therefore the
    work is never done on the "GUI toolkit".

    Having switched to test-driven development I find that writing unit
    tests for GUI behavior is possible, but that its obvious that the
    existing toolkits and support infrastructure are not written to make
    this easy. This is even true for C# where the GUI toolkit and
    supporting infrastructure is much newer than it is for C++. If I want
    to follow the "humble dialog" pattern[1], I find that I have to create
    lots of interfaces or other ways to decouple myself from the concrete
    GUI classes.

    Doing this repeatedly has made me wonder why there aren't any GUI
    toolkits that specify *all* the UI objects as interfaces instead of
    concrete classes. If this were the case, then making test doubles for
    those UI objects would be trivial making it much easier to write
    tests.

    [1] <http://xunitpatterns.com/Humble%20Object.html>
    --
    "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
    <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

    Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
     
    Richard, Dec 30, 2010
    #14
  15. Robin

    Richard Guest

    [Please do not mail me a copy of your followup]

    "Jarrick Chagma" <> spake the secret code
    <> thusly:

    >Richard, I could be wrong but I believe "modern" versions of Qt actually do
    >in fact now use native widgets in preference to artificial widgets on all
    >platforms.


    Unless they changed it in the past year, no, they don't. I've stepped
    through the code many times; they render everything themselves down
    into pixels that are blasted to the screen.
    --
    "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
    <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

    Legalize Adulthood! <http://legalizeadulthood.wordpress.com>
     
    Richard, Dec 31, 2010
    #15
  16. Robin

    ptyxs Guest

    On Dec 30, 7:37 pm, (Richard) wrote:
    > They talk about how you can run a Qt
    > application with a command-line argument to get a Mac look and feel on
    > Windows.  They talk about this as if it were a feature, but seriously
    > if you're on Windows you want things to look like Windows, not like a
    > Mac and vice-versa.  This is more of a side-effect of them
    > reimplementing/immitating the look and feel of the platforms they
    > support, not a feature.
    >

    I don't understand your point : by default, Qt4 uses of course the
    style of the platform the application is designed for. What you are
    alluding to is just an optional trick, probably rarely used. So what
    is the problem ??


    > Because Qt reimplements everything itself,

    As said before by other people, this is no longer true.

    > This explains why major new releases are full of
    > problems when they come out.


    I never heard that recent releases 4.6 and 4.7 were that problemful,
    rather the opposite.

    > The documentation can also get a bit sketchy.  

    Qt documentation is remarkably clear and searchable. One of the best I
    ever saw.
     
    ptyxs, Dec 31, 2010
    #16
  17. Robin

    Rolf Magnus Guest

    Richard wrote:

    > [Please do not mail me a copy of your followup]
    >
    > "Jarrick Chagma" <> spake the secret
    > code <> thusly:
    >
    >>Richard, I could be wrong but I believe "modern" versions of Qt actually
    >>do in fact now use native widgets in preference to artificial widgets on
    >>all platforms.

    >
    > Unless they changed it in the past year, no, they don't. I've stepped
    > through the code many times; they render everything themselves down
    > into pixels that are blasted to the screen.


    Under Windows, Qt uses the Windows style engine to draw widgets. And for
    standard dialogs like the file dialog, it also uses the native ones by
    default.
     
    Rolf Magnus, Dec 31, 2010
    #17
  18. Robin

    Rui Maciel Guest

    ptyxs wrote:

    >> Because Qt reimplements everything itself,

    > As said before by other people, this is no longer true.


    Not quite. Qt still implements classes such as QString, QVector, QList,
    QMap and others, although standard C++ containers are either ignored or
    supported only as far as it is possible to convert them to Qt's own
    components.


    Rui Maciel
     
    Rui Maciel, Jan 2, 2011
    #18
  19. Robin

    Miles Bader Guest

    Rui Maciel <> writes:
    >>> Because Qt reimplements everything itself,

    >> As said before by other people, this is no longer true.

    >
    > Not quite. Qt still implements classes such as QString, QVector, QList,
    > QMap and others, although standard C++ containers are either ignored or
    > supported only as far as it is possible to convert them to Qt's own
    > components.


    Why, exactly? Is it a vestige of the bad old days when STL tended to be
    less reliably available?

    -Miles

    --
    ((lambda (x) (list x x)) (lambda (x) (list x x)))
     
    Miles Bader, Jan 3, 2011
    #19
  20. On Sun, 02 Jan 2011 23:14:46 +0000, Rui Maciel wrote:

    > ptyxs wrote:
    >
    > >> Because Qt reimplements everything itself,

    > > As said before by other people, this is no longer true.

    >
    > Not quite. Qt still implements classes such as QString, QVector, QList,
    > QMap and others, although standard C++ containers are either ignored or
    > supported only as far as it is possible to convert them to Qt's own
    > components.


    AFAIK the Qt containers originated from a time when use of the STL
    was pretty much ``at your own risk'' and its cross-platform usability
    was so pathetic it was far easier to write and maintain your own than
    deal with its drama. Second, all of the Qt classes you mentioned have
    implicit sharing and copy-on-write semantics, which the STL classes
    don't have. While its use for the generic containers is arguable,
    it's without a doubt a huge bonus for QString. Third and foremost of
    all: QString is so much more than std::string, the comparison isn't
    even funny anymore. The most important thing is not the class itself
    but the interfaces the Qt lib provides for this class (and conversely
    what interfaces the STL does _not_ provide for std::string): filesystem
    (i.e. portable unicode filename handling, not the ``implementation-
    defined''-crap the standard lib tries to get away with), command line
    (same here: unicode-transparent), a huge zoo of text codecs for the
    (rare within Qt-)cases where you have to explicitly deal with character
    encodings and so on. In other words: no, QtCore doesn't ``duplicate''
    the STL, it fills some huge, gaping holes the STL won't touch (at
    least the current one).



    Andreas
    --
    Dr. Andreas Dehmel Ceterum censeo
    FLIPME(ed.enilno-t@nouqraz) Microsoft esse delendam
    http://www.zarquon.homepage.t-online.de (Cato the Much Younger)
     
    Andreas Dehmel, Jan 3, 2011
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ramon F Herrera

    Can Java do fancy GUIs?

    Ramon F Herrera, Apr 16, 2005, in forum: Java
    Replies:
    56
    Views:
    1,651
    Thomas G. Marshall
    Apr 23, 2005
  2. Replies:
    2
    Views:
    339
  3. Berlin  Brown

    Testing Swing GUIs

    Berlin Brown, Jul 19, 2005, in forum: Java
    Replies:
    4
    Views:
    532
    Thomas Hawtin
    Jul 19, 2005
  4. Stewart
    Replies:
    1
    Views:
    565
    John Harrison
    Sep 16, 2004
  5. V e X y N

    GUIs and Compilers.. <help>

    V e X y N, Aug 22, 2003, in forum: C Programming
    Replies:
    2
    Views:
    386
    Greg P.
    Aug 22, 2003
Loading...

Share This Page