英文:
Qt Quick emulator layer crash
问题
我在项目文件夹中创建了一个空的QT Quick应用程序和一个ui.qml文件,但无法以设计模式打开ui文件。
描述错误消息的对话框说:
行:1: Qt Quick模拟器层崩溃
查看代码的第1行,我找不到任何错误
import QtQuick 2.12
import QtQuick.Controls 2.12
Item {
width: 400
height: 400
Page {
id: page
width: 200
height: 200
Button {
id: button
}
CheckBox {
id: checkBox
text: qsTr("Check Box")
}
Label {
id: label
text: qsTr("Label")
}
}
}
我尝试更改QML模拟器的路径,但没有解决问题。
路径配置
问题可能是什么,如何解决?
英文:
I created an empty QT Quick Application and a ui.qml file in the project folder but I'm unable to open the ui file in design mode.
A dialog box describing error message says:
ine:1: Qt Quick emulator layer crash
Taking a look at line 1 of the code, i can't find any error
import QtQuick 2.12
import QtQuick.Controls 2.12
Item {
width: 400
height: 400
Page {
id: page
width: 200
height: 200
Button {
id: button
}
CheckBox {
id: checkBox
text: qsTr("Check Box")
}
Label {
id: label
text: qsTr("Label")
}
}
}
<!-- end snippet -->
I tried changing the path for the QML EMULATOR but it didn't solve the issue.
path configurations
What can be the problem and how can it be fixed?
答案1
得分: 2
今天我遇到了这个错误。但我已经成功修复了它。
你需要做的是:工具->QT Quick->QT Quick Designer->QML仿真层,选择“使用与选定的QT构建的QML仿真层”。
无需选择路径,
解决方案首次出现在这个帖子中。
https://stackoverflow.com/questions/29290631/cannot-connect-to-qml-emluation-layer-qml-puppet
英文:
I ran into this error today. But I've successfully fixed it.
You need to do this:Tool->QT Quick->QT Quick Designer->QML Emulation Layer , "Use QML Emulation Layer that is built with selected QT"
No need to choose a path,
The solution was first in this thread.
https://stackoverflow.com/questions/29290631/cannot-connect-to-qml-emluation-layer-qml-puppet
答案2
得分: 0
尝试将 "Item" 更改为 "Rectangle"。不确定为什么,但有时对我有效。
英文:
Try changing Item
to Rectangle
. Not sure why but it works for me sometimes.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论