Recognize all the Qt headers



  • I have recently installed QT5 in my Win7 machine and although Visual Studio 10 Express (VS10E) recognize all the qt headers such:
    #include <QtCore/QString>
    and
    #include <QtCore/QFile>
    it fails to recognize or locate the location of this header
    #include <QtCore/QApplication>
    or
    #include <QApplication>

    What am I missing? How can I solve this problem?

    Tia


  • Moderators

    Qt5 had some changes here. These are application classes available and their modules:

    • <QtCore/QCoreApplication>
    • <QtGui/QGuiApplication>
    • <QtWidgets/QApplication>


  • QApplication is not in the QtCore module, it is in QtWidgets, which additionally requires you to add <code>QT += widgets</code> to your <code>.pro</code>, as it is a seperate module now.

    Be aware that you do not need to specify the module, <code>#include <QApplication></code> is just as fine as <code>#include <QtWidgets/QApplication></code>.



  • OKaaayyy. Well, I'd like to know the API and for that I have to hard code the apps. I don't want to use the RAD that comes with Qt5, as I said, I prefere to hard code. Are there any tutorials online that would teach how to build a complete program by hand using Visula Studio 10 Express as the IDE? not using qt quick?

    Thanks




  • Moderators

    [quote author="ArbolOne" date="1357812353"]OKaaayyy. Well, I'd like to know the API and for that I have to hard code the apps. I don't want to use the RAD that comes with Qt5, as I said, I prefere to hard code. Are there any tutorials online that would teach how to build a complete program by hand using Visula Studio 10 Express as the IDE? not using qt quick?

    Thanks[/quote]

    That is almost incomprehensible to me. What exactly are you talking about? QtQuick and VisulalStudio have nothing to do with each other. You can use either QtWidgets or QtQuick, regardless of the IDE you are using. QtDesigner is also available if you prefer it to Qt Creator. There is Qt Visual Studio Add-in that enables easy Qt development in MSVS, but I think it does not work with Express edition (please check, though).

    What is this bit about hard-coding? It seems not to be connected with your initial post. To know the API, study the documentation, it's one of the best framework documentations available. Yes, there are many tutorials on that, including the docs and wikis on qt-project.org.



  • [quote author="sierdzio" date="1357812954"]There is Qt Visual Studio Add-in that enables easy Qt development in MSVS, but I think it does not work with Express edition (please check, though).[/quote]

    I used it quite recently for one of my project and I can say yes, you need the commercial version of MSVS to use Qt VS add-in.


Log in to reply
 

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