Congratulations to our 2022 Qt Champions!

How does the "Getting Started" tutorial code actually launch?

  • In the tutorials examples directory, there is a .pro Quick project called "". I am trying to understand how to run this project. There are two notable areas of confusion:

    1. There is no main.cpp so how does it even get launched?
    2. The Qml interface is in the Core directory, but this directory is not referenced anywhere in the project that I can find, nor do those qml files appear in the Creator when you load the project. How does it see them?

  • Moderators

    I;m not familiar with any tutorials, but I may know the answer to "main.cpp" thing: QML can be launched without any use of C++, by running qmlViewer.

  • I'm using Qt 5.1.0 and the following process works for me.

    Copy an example directory to somewhere.
    $ cd ~/src
    $ cp -r /usr/local/Qt-5.1.0/examples/quick/tutorials/gettingStartedQml/parts/part5 ./

    Make plugins of the example (if any).
    $ cd filedialog
    $ qmake
    $ make

    When you see .pro file, you can execute qmake and make to build .cpp files.

    Run the example
    $ cd ~/src/part5
    $ qmlscene TextEditor.qml

Log in to reply