小编Cod*_*ist的帖子

为什么 QTCreator 中缺少 Ubuntu.Components 0.1?

首先,我需要使用 QML 和 QT Creator 创建一个“hello world”应用程序,如下所述 http://developer.ubuntu.com/get-started/gomobile/

其次,当我尝试安装 QML 平台和依赖项时,我无法运行第 2 步(“安装 Ubuntu QML 工具包预览版”),因为我有一个基于 ubuntu 12.04 的发行版(backbox),但我按照以下步骤解决了它这篇文章的说明:https : //askubuntu.com/questions/235440/how-do-i-install-the-qml-toolkit-on-12-04

第三,当我打开 QTCreator 并尝试执行CurrencyConverter(helloWorld 应用程序)时,程序找不到以下包:

import Ubuntu.Components 0.1
Run Code Online (Sandbox Code Playgroud)

我该怎么做才能运行该应用程序?

提前致谢。

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
       }
    } …
Run Code Online (Sandbox Code Playgroud)

application-development qt-creator qml ubuntu-touch

13
推荐指数
1
解决办法
4723
查看次数