我正在尝试使用 Qt Creator 制作一个简单的 Ubuntu Touch Web 应用程序。我已根据教程设置了一个新项目,并将文件提交给 Bazaar。我在项目的 qml 文件中设置了一个 url,而不是默认的 index.htm。使用 build->run 会加载一个带有所需网页的 QML Scene 窗口,但 Qt Creator 会产生以下输出:
Starting /usr/lib/i386-linux-gnu/qt5/bin/qmlscene -I /home/tomas/ubuntu-sdk/SL-planner -I /usr/bin -I /usr/lib/i386-linux-gnu/qt5/qml /home/tomas/ubuntu-sdk/SL-planner/SL-planner.qml
unity::action::ActionManager::ActionManager(QObject*):
Could not determine application identifier. HUD will not work properly.
Provide your application identifier in $APP_ID environment variable.
file:///usr/lib/i386-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null
我的 SL-planner.qml 如下所示:
import QtQuick 2.0
import Ubuntu.Components 0.1
import QtWebKit 3.0
/*!
\brief MainView with a Flickable WebView.
*/
MainView {
// objectName for functional testing purposes (autopilot-qt5)
objectName: "mainView"
// Note! applicationName needs to match the "name" field of the click manifest
applicationName: "com.ubuntu.developer.tomoqv.SL-planner"
/*
This property enables the application to change orientation
when the device is rotated. The default is false.
*/
automaticOrientation: true
width: units.gu(100)
height: units.gu(75)
Flickable {
id: webViewFlickable
anchors.fill: parent
WebView {
id: webView
anchors.fill: parent
url: "http://mobil.sl.se"
}
}
}
我错过了什么?