【发布时间】:2018-09-14 04:06:03
【问题描述】:
Qt:5.11.1
操作系统:Windows 10 64 位
这是 Qt Quick 应用程序。当窗口处于全屏模式时。布局变得奇怪。我认为这是之前尺寸的残像。
启动
全屏
import QtQuick 2.9
import QtQuick.Window 2.2
import QtQuick.Layouts 1.3
Window {
visible: true
width: 640
height: 480
title: qsTr("Hello World")
ColumnLayout{
spacing: 2
anchors.fill: parent
Rectangle {
Layout.alignment: Qt.AlignCenter
color: "red"
Layout.preferredWidth: 40
Layout.preferredHeight: 40
}
Rectangle {
Layout.alignment: Qt.AlignRight
color: "green"
Layout.preferredWidth: 40
Layout.preferredHeight: 70
}
Rectangle {
Layout.alignment: Qt.AlignBottom
Layout.fillHeight: true
color: "blue"
Layout.preferredWidth: 70
Layout.preferredHeight: 40
}
Rectangle {
Layout.alignment: Qt.AlignBottom
Layout.fillHeight: true
color: "orange"
Layout.preferredWidth: 70
Layout.preferredHeight: 40
}
}
}
【问题讨论】:
-
很好,但你的问题是什么?
-
看起来很像一个错误。你应该在这里报告:bugreports.qt.io/secure/Dashboard.jspa