I have this pro file
QT += qml quick widgets
TARGET = sPassKeeper
include(src/src.pri)
include(qml/qml.pri)
RESOURCES += \
resources.qrc
in src pri and qml pri only single lines qml.pri
OTHER_FILES += \
qml/main.qml
src.pri
SOURCES += \
src/main.cpp
In main.cpp got this code
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QtDebug>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QQmlApplicationEngine engine(QUrl("qrc:/new/prefix1/qml/main.qml"));
qDebug() << "Ok engine created";
// Q_UNUSED(engine)
return app.exec();
}
main.qml
import QtQuick 2.0
import QtQuick.Controls 1.1
ApplicationWindow{
title: "sPassKeeper"
Button{
text: "Hello"
}
}
As a result got this output
QML debugging is enabled. Only use this in a safe environment. Ok engine created
Nothing displayed and process is not completed.