2016-11-14 15 views
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コンパイラ)

答えて

0

ソリューション:

がwindeployqt使用しないでください。

Qt 5.7 for Windowsをインストールします。 Process Explorerと手動コピーの依存関係を使用します。

+0

'windeployqt'を使って正常にデプロイするには、' qmldir'フラグを使うべきです。 QMLファイルのディレクトリに入ると、すべての依存関係が考慮されます。 – BaCaRoZzo

+0

このフラグは、必要なQMLファイルを展開するために使用します。しかし、windeployqtは間違ったライブラリをコピーします(私は何がうまくいかないか正確にはわかりません)。 –

+0

私は確かに言うことはできませんが、MSのバージョンを配備したことはありませんが、おそらくバグレポートを提出するべきです。 – BaCaRoZzo

関連する問題