我測試一個簡單的QML(Qt的SDK版本5.3.2)這樣的程序QML錨通過id來ApplicationWindow不行
import QtQuick 2.3
import QtQuick.Controls 1.2
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
id: appWin
Text {
text: qsTr("Hello World")
anchors.bottom: parent.bottom
}
}
我想要的文本將在應用程序窗口的底部奠定,這是工作。但如果我將anchors.bottom: parent.bottom
更改爲anchors.bottom: appWin.bottom
(通過ID),錨不再工作,這是一個錯誤?
謝謝,沒錯。 – secmask 2014-09-29 13:49:27