Qt Quick分组属性案例
import QtQuick 2.4 import QtQuick.Controls 1.4 import QtQuick.Controls.Styles 1.4 import QtQuick.Window 2.2 Window { visible: true MainForm { anchors.fill: parent mouseArea.onClicked: { Qt.quit(); } Rectangle{ width:320 height: 480 Button{ id: openFile text: "Open" anchors.left: parent.left anchors.leftMargin: 6 anchors.top:parent.top anchors.topMargin: 6 } Button{ id: quit text: "Quit" anchors{ left: openFile.right leftMargin: 4 bottom: openFile.bottom } onClicked: { Qt.quit() } } } } }