QML WebView 组件尚未准备就绪
QML WebView component is not ready
main.qml:
ApplicationWindow {
visible: true
visibility: "Maximized"
title: "My title"
WebView {
id: webView
objectName: "webView"
anchors.fill: parent
url: initialUrl
}
}
主.cpp:
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上我有这个错误:
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 Qt5Quick!?setParentItem@QQuickItem@@QAEXPAV1@@Z () from C:myprog-distQt5Quick.dll
如何解决?Qt 5.7.0 (msvc 2015 编译器(
解决方案:
不要使用 windeployqt。
安装 Qt 5.7 for Windows。使用进程资源管理器和手动复制依赖项。
相关文章:
- 如何将 txt 文件中的行分隔为组件C++
- 使用不同的CRT将新的C++代码与旧的(二进制)组件隔离开来的最佳方法是什么
- 到连接组件算法的问题(递归)
- 两个 COM 组件中 ENUM 的重复条目
- 为什么 gcc 会产生这种奇怪的组件与叮当声?
- 使用 bfs 解决连接组件问题时得到错误的答案
- 如何在ECS框架中更新组件数据和通知系统
- 如何从ECS中的模板方法获取组件?
- 使用蓝牙组件将数据从Android手机传输到串行设备时出现问题
- 组件上的虚幻引擎可蓝图UFUNCTION会导致构建错误
- 在C++中访问蓝图类组件的正确方法是什么?
- 有关纯 ECS(实体组件系统)和更新系统的问题
- 提高基于组件的游戏引擎的效率
- 从组件的 std::type_index 获取派生最多的类型
- 我们可以将阈值应用于色彩空间模型的单个组件(如 RGB 和 LAB)吗?
- 如何通过 UActor组件获取演员列表?
- 在Visual Studio 2017中使用c ++组件构建python解决方案时出现问题
- Linux - 查找进程是否已准备就绪或正在运行
- (如何)当std::future准备就绪时,我可以获得boost::asio::io_service的回调吗
- QML WebView 组件尚未准备就绪