Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.14.0
-
None
-
Manjaro Archlinux 64bit
Description
Using the example project in the attachments, I have an error when setting the source of a QQuickWidget, created in a plugin and displayed in the main application, to a qml resource file.
Indeed:
// no qml displayed // error written in console: // "file:///path/to/QMLfromPlugin/: file to open is a directory" widget->setSource(QUrl(":/qml/MyQmlFile.qml")); // works just fine widget->setSource(QUrl(QDir(QCoreApplication::applicationDirPath()).path() + "/qmlplugin/qml/MyQmlFile.qml")); // works just fine as well QString qrcPath(":/qml/MyQmlFile.qml"); QFile file(qrcPath); qDebug() << qrcPath << "open" << file.open(QIODevice::ReadOnly); qDebug() << qrcPath << "error" << file.errorString();