Important: Please read the Qt Code of Conduct -

From PHP back ground to Qt

  • Dear all,

    I am a PHP Programmer with around 15 years experience.
    I have create few Android and Java applications.

    Planning to learn Qt in my spare time.
    (at least 3 hours a day)

    How long does it take to learn Qt and develop a small Ecommerce
    on Mac?

    Thanks guys.

  • Moderators

    Depends what you mean by "learn" of course. I am using Qt for 8 years now and I still haven't used - probably - most of it's classes.

    In general, there are some books on Qt, and the built-in documentation is superb (especially for old classes and modules), so learning is quite easy and fun. And since Qt's API is easier, more intuitive than all technologies you've mentioned, you will probebly enjoy the process.

  • Dear sierdzio,

    Thanks for the very informative answer.

    Lucky to get a reply from someone with eight years experience.

    I found lots of good books and tutorials.
    Going to have fun in my spare time.

    'Depends what you mean by “learn” of course' -> Well I meant write codes and do some fun stuff.

    Thanks again
    Take care

  • Moderators

    Check out voidrealms tutorials on YouTube, they say those are very good.

    Apart from that, there is the new "qmlbook": and the old: "link": I've only read the latter. It's very, very good, but based on Qt 4.2 so a lot of stuff has changed since then. Qt Creator also comes with lots and examples, and there is always the documentation.

    I suggest starting with some small projects, for me that was always the best way to learn new things: by trying out something I have no idea how to make. When you want to do some stuff, usually the first name for that functionality that comes to your mind is actually a name of Qt Class. Wand to handle strings? QString. Date? QDate. Read a file? QFile.

  • Dear sierdzio,

    Thanks again for the valuble information.
    Checked voidrealms tutorials. Good as Gold.
    I found NewBoston YouTube tutorials by Bucky also fascinating.

    qmlbook is great. I don't know how to thank you.
    I found two books:

    1. C++ GUI programming with Qt 4
    2. Advanced Qt programming
      by Mark Summerfield

    As you suggest I am going to do some small projects.

    I have Qt Creator 5.4.0.
    Can I use Qt 4.0 codes on it?

    Thanks for the tips.
    Going to have fun.

    Take care

  • Moderators

    [quote author="nimmividya" date="1423481672"]I have Qt Creator 5.4.0.
    Can I use Qt 4.0 codes on it?[/quote]

    Actually the newest release of Qt Creator is 3.3.1 ;-) But I know this can be confusing in the beginning. What you have (most probably) is Qt 5.4.0 and Qt Creator 3.3 (or 3.2). Those are separate products, although they are very close to one another. Qt Creator is the IDE (written using Qt frameworks), and Qt is, well, Qt itself.

    Going back to your question. Yes, Qt Creator still supports Qt 4, and will continue doing that for a long time. However, you would have to install Qt 4 separately, and then configure Qt Creator to use it. It is not hard, but for a beginner I think it will needlessly add complexity where you don't need it.

    So I advise going for Qt 5.4. It is mostly source-compatible with Qt 4, so I think you should be fine. The biggest difference that you need to remember about is that QtGui in Qt 5 has been split into 2 separate modules: QtGui (contains some general GUI helper classes, QApplication, QScreen, the new QWindow) and QtWidgets (contains all the widgets from Qt4: QPushButton, QLabel, and so on).

    So, when looking at an old book, or example, you see:
    #include <QtGui>

    You most probably need to change it into:
    #include <QtWidgets>

    However, both Qt 4 and Qt 5 support (and actually, strongly encourage) direct includes. These are compatible with both versions and do not need to be changed. Example:
    #include <QWidget>
    #include <QPushButton>

    In the .pro file (you are most probably using qmake and .pro files to create projects) it is enough to add this line in Qt5;
    QT += widgets

    Qt Creator will do this automatically for you when you create a new project.

    Hint: Qt Creator and Qt installation includes full documentation (also available on "":, and you can quickly jump to Help Mode by hovering over any Qt class or function: Qt Creator will show you a brief description of that class. You can then click F1 and it will display full class description, with the whole API.

    If you have any questions, or encounter any problems, you can always ask for help here, and somebody (possibly me ;-)) will guide you.

  • Dear sierdzio,

    Thanks for the clarification :-). Qt IDE is version 3.2 or 3.3 and Qt is the framework. It's version is 5.4.0 I never knew that.
    Great to hear that I can use all my Qt 4.0 resources in Qt 5.4

    Thanks again for all the hints and tips.
    Soon I am going to do some coding.

    I am based in Japan.
    Getting dark (around 9.15PM)

    I will post my questions here.
    Need all Qt lovers guide.

    Thanks again
    Take care

Log in to reply