0
main.qml:QMLのWebViewのコンポーネントの準備ができていません
ApplicationWindow {
visible: true
visibility: "Maximized"
title: "My title"
WebView {
id: webView
objectName: "webView"
anchors.fill: parent
url: initialUrl
}
}
main.cppに:
warning: QQmlComponent::Status(Ready) // This "qDebug() << component.status();" from my code
warning: QQmlComponent: Component is not ready
warning: QObject::connect: invalid null parameter
warning: QObject::connect: invalid null parameter
warning: QObject::connect: invalid null parameter
warning: QObject::connect: invalid null parameter
Program received signal SIGSEGV, Segmentation fault.
0x6e9cd3dd in [email protected]@@[email protected]@Z() from C:\myprog-dist\Qt5Quick.dll
:
QQmlApplicationEngine engine;
QQmlContext *context = engine.rootContext();
context->setContextProperty(QString("initialUrl"), "http://google.com/");
QQmlComponent component(&engine, QUrl("qrc:/qml/main.qml"));
qDebug() << component.status();
component.create();
これは、LinuxとAndroidでなく、Windows上での作業だ私はこのエラーを持っています
修正方法? のQt 5.7.0(MSVC 2015コンパイラ)
'windeployqt'を使って正常にデプロイするには、' qmldir'フラグを使うべきです。 QMLファイルのディレクトリに入ると、すべての依存関係が考慮されます。 – BaCaRoZzo
このフラグは、必要なQMLファイルを展開するために使用します。しかし、windeployqtは間違ったライブラリをコピーします(私は何がうまくいかないか正確にはわかりません)。 –
私は確かに言うことはできませんが、MSのバージョンを配備したことはありませんが、おそらくバグレポートを提出するべきです。 – BaCaRoZzo