Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.3.2, 5.4.0
-
None
-
Windows 7
Description
I have a RowLayout with three buttons with spacers between them. One button and one spacer are invisible like that:
[B] <=> [B] <=> [B] | | ------ | invisible
When the user presses the third button the first button and spacer become visible. After that all three buttons are positioned incorrectly like that:
[B][B] <=> [B]
See qml-layout-after-click.png.
Expected (see qml-layout-expected.png):
[B] <=> [B] <=> [B]
Source code:
import QtQuick 2.3 import QtQuick.Controls 1.2 import QtQuick.Layouts 1.1 ApplicationWindow { visible: true width: 320 height: 200 title: qsTr("Hello World") RowLayout { anchors.fill: parent Button { id: buttonStart visible: false text: "START" } Item { Layout.fillWidth: true visible: buttonStart.visible } Button { text: "RX" } Item { Layout.fillWidth: true } Button { text: "EX" onClicked: { buttonStart.visible = true; } } } }
Steps to reproduce:
Compile and run. Press "EX" button.