Enjoying Qt!

  • Just wanted to put in a positive poke...

    I've been programming in various languages since 1972. I am enjoying Qt and find the framework to be easy and fun to use.

    It certainly doesn't hurt that so many updates have been made to C++ since my original exposure (just about the first day a c++ compiler was available).

    Anyway I've been in this business long enough to know that most of the time these forums are about bitching and moaning about what doesn't work. This is a positive post about what does!

    Keep up the great work. Qt is nice, fun, functional and really quite a blast!

  • Moderators

    Hi SysTech,

    It's great to read your encouraging post! Happy coding! :-D

  • Just want to add, it's really neat to see how Qt is enhanced by all the new C++ features. like initializer lists for QStringList and lambdas as slot functions.
    Re. the latter, last year I learned from the code in your QtSdkRepoChooser (thanks JKSH) how lambdas can simplify network coding.
    And now in 5.4, I saw that the singleshot timer also accepts a lambda, which gave me an idea how to simplify exiting from a singleton-flavored program, i.e. in MainWindow's ctor I want to exit if an earlier instance of the program exists, but calling QApplication::quit() has no effect because QApplications's event loop has yet not started (a bit of a Catch-22), so instead:
    @QTimer::singleShot(100,{ QApplication::quit(); });

  • I also love Qt. I finally have got past the learning curve to handle the basics of designing GUI's and plugging in my own C++. It is awesome, and I'm impressing all of my friends!

  • Logic is:
    When I have everything working you will not see me here.
    Since you see me you can't claim that Qt is 100% functional.

    Good news are that it might be good enough cause you did not see me here for more than 1 year and I even could not recover gmail account I used .

    And no joke having C++ gui library with available source code rocks :)

  • Moderators

    hskoglund: I'm glad that my code was helpful to you :) Yes, Qt and C++11 are a match made in heaven!

    [quote author="hskoglund" date="1421831344"]
    QTimer::singleShot(100,{ QApplication::quit(); });
    [/quote]There are 3 ways to shorten this further:

    • If you use a timer value of 0, it will fire as soon as the event loop starts
    • The parenthesis can be omitted when the lambda takes no arguments
    • Use the global qApp pointer

    QTimer::singleShot(0, []{ qApp->quit(); });

  • I just realised that I've been using Qt for almost five years. I remember how it was a little difficult in the beginning, but the awesome documentation enabled me to do what I set out to do back then, and after my first project was done, I stuck to Qt - because yes, programming with Qt is a lot of fun! I consider myself lucky that this was the first framework I even tried ( had to do everything manually before), although Qt kind of spoiled me since all the other frameworks I have come into contact with since paled in comparison.

    Thanks Qt, and thanks forum for (mostly) helping me to chew through the difficult stuff. :)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.