just want to share what i have put extra in the pro file:
# Add more folders to ship with the application here
RESOURCES += resources.qrc # uncomment for publishing
contains( RESOURCES, resources.qrc ) {
DEFINES += LOAD_QML_FROM_RESOURCE
}
so if we load from resource, there will be a define of LOAD_QML_FROM_RESOURCE
then in main.cpp
// use this during development
// for PUBLISHING, use the entry point below
#ifndef LOAD_QML_FROM_RESOURCE
vplay.setMainQmlFileName(QStringLiteral("qml/Main.qml"));
#endif
// use this instead of the above call to avoid deployment of the qml files and compile them into the binary with qt's resource system qrc
// this is the preferred deployment option for publishing games to the app stores, because then your qml files and js files are protected
// to avoid deployment of your qml files and images, also comment the DEPLOYMENTFOLDERS command in the .pro file
// also see the .pro file for more details
#ifdef LOAD_QML_FROM_RESOURCE
vplay.setMainQmlFileName(QStringLiteral("qrc:/qml/Main.qml"));
#endif
ok sorry, i have still vplay in there, but that needs to be felgo of course, but this came from an older project.
greetz,
Bas