我在 qt creator 中制作货币转换程序时遇到了这个问题。
程序如下:
import QtQuick 2.0
import Ubuntu.Components 0.1
Rectangle {
id: root
width: units.gu(60)
height: units.gu(80)
color: "lightgray"
property real margins: units.gu(2)
property real buttonWidth: units.gu(9)
Label {
id: title
ItemStyle.class: "title"
text: i18n.tr("Currency Converter")
height: contentHeight + root.margins
anchors {
left: parent.left
right: parent.right
top: parent.top
}
}
}
错误说:
Starting /usr/bin/qmlviewer -I /usr/lib/qt4/imports /home/shri/CurrencyConverter/CurrencyConverter.qml
Qml debugging is enabled. Only use this in a safe environment!
file:///home/shri/CurrencyConverter/CurrencyConverter.qml:1:1: module "QtQuick" version 2.0 is not installed
import QtQuick 2.0
^