I am building an application with mixed UI technologies (mostly C++ with some QML components included).
Suppose I have a QML item which I want to show inside a QDeclarativeView
using syntax like this:
view = new QDeclarativeView(QUrl::fromLocalFile("foobar.qml"));
I have added foobar.qml to my project in Qt Creator which automatically adds this line to the .pro file:
OTHER_FILES += \
foobar.qml
Now, you would expect including the file into the project to imply that it should be copied to the build folder, but it doesn't, and I get an error about missing foobar.qml in the build folder when I run the application. I'd hate to add custom build steps just to copy QML sources around, so is there some "de facto" way of doing this?