Run QML only app as subdir project


I created simple QML only app from template in Qt Creator. Than I moved that project to subdir “application”, rename to and create new root .pro file with

TEMPLATE = subdirs
SUBDIRS += application

But after that when I try build and run project, it has successful deployed but not autoruned of app, instead I have popup to define custom executable command.

So, please, how I can define to run QML only app as subdir project?

Only the root project can be recognized and automatically configured as a QML only app project. You can fix the run configuration manually by setting /usr/bin/sailfish-qml as the (custom) executable and passing application name as argument, but then you will likely find some other features missing/broken (debugger, QML Live, …).

As the name suggests, QML only app projects are well suitable just for the “QML-only application project” case. Your case seems to be something like “QML module project with test app included”. I would add a C++ main and replaced CONFIG += sailfishapp_qml with CONFIG += sailfishapp (check for more differences between regular and QML-only project template).

1 Like

@martyone , thank you!