qt 6.5 qml module notfound
Unsolved
QML and Qt Quick
-
I used the new module function of qt6.5, and I was prompted in main.qml that qml module not found, but the project could be built and run normally, and it found my button correctly.
main.cppint main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QQmlApplicationEngine engine; QObject::connect(&engine, &QQmlApplicationEngine::objectCreationFailed, &app, []() { QCoreApplication::exit(-1); }, Qt::QueuedConnection); engine.loadFromModule("qt65_2", "Main"); return app.exec(); }
main.qml
import QtQuick import QtQuick.Window import example.mystyle 1.0 Window { width: 640 height: 480 visible: true title: qsTr("Hello World") MyButton{} }