Project files in q Qt application combining both C++ and QML



  • Hello all,

    I'll like to create q Qt application combining both C++ and QML code.
    The code could be composed for example by the following files:

    @Apps\app.pro
    \main.cpp
    \app\file1.cpp
    \app\file1.hpp
    \app\file2.cpp
    \app\file2.hpp
    \gui\main.qml
    \components\component1.qml
    \components\component2.qml
    \components\component3.qml@

    My question here is for understanding where the project files (.pro .pri) files have to be placed, what template have to be used and how these files should look like.

    @Apps\app.pro
    \main.cpp
    \app\app.pri
    \app\file1.cpp
    \app\file1.hpp
    \app\file2.cpp
    \app\file2.hpp
    \gui\main.qml
    \components\components.pro
    \components\component1.qml
    \components\component2.qml
    \components\component3.qml@

    Can someone point me to a good example which I could base on?



  • You can look at the example directory in your Qt installation.

    Examples/Qt-5.3/quick/controls/calendar


Log in to reply
 

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