1
我想在ColumnLayout中使用topMargin。但我正面臨一些問題。 有人能幫我解決這個問題嗎?如何在QML的ColumnLayout中使用topMargin
這裏是我的代碼
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
import QtQuick.Layouts 1.1
ApplicationWindow {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
Rectangle{
anchors.fill: parent
ColumnLayout{
id: columlayout
Rectangle{
width: 100
height: 100
color: "red"
}
Rectangle{
Layout.topMargin: 50
width: 100
height: 100
color: "green"
}
Rectangle{
width: 100
height: 100
color: "blue"
}
}
}
}
問題:
無法指定