Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.7.0 Beta
-
None
Description
When I clear stack and then push item here, it doesn't displayed. If it use replace() instead or push Component instead of Item, it works.
The item is visible, has proper parent and dimensions. It is also currentItem of the stack, but after clear() it has wrong x coordinate which doesn't change after push.
To reproduce, run test program, click on "switch", then click on "back".
import QtQuick 2.6 import QtQuick.Controls 2.0 ApplicationWindow { visible: true width: 640 height: 480 StackView { id: stackView anchors.fill: parent initialItem: first } Rectangle { id: first color: "green" onXChanged: console.log(x) } Component { id: second Rectangle { color: "blue" } } footer: Row { spacing: 10 Button { text: "switch" onClicked: stackView.replace(null, second) } Button { text: "back" // onClicked: stackView.replace(null, first) onClicked: { stackView.clear() stackView.push(first) } } } }
Attachments
Issue Links
- relates to
-
QTBUG-61496 StackView: pop() with StackView.Immediate leads to blank StackView
- Closed