- 
    
Bug
 - 
    Resolution: Done
 - 
    
P2: Important
 - 
    5.7.0, 5.10.0, 5.12.2, 5.12.5, 5.13.0, 5.13.1
 - 
    Windows 7 64bits
Qt 5.7.0 
- 
        06162b3712b6ff2e25e1b20a139fe5c42e95b123
 
If an item is pushed on the stack before its exit animation ends, the stack will display an empty content.
Test Case
- StackView's initial item is redRect
 - push blueRect
 - before animation ends, push redRect
 
Expected result
- redRect is visible at the end of the transitions (preferably, both rects are visible during the transitions, if possible)
 
Actual result
- StackView appears empty
 
import QtQuick 2.10 import QtQuick.Window 2.3 import QtQuick.Controls 2.3 ApplicationWindow { id: mainWindow visible: true StackView { id: stackView anchors.fill: parent replaceEnter: Transition { XAnimator { from: stackView.width; to: 0; duration: 1000; easing.type: Easing.OutCubic } } replaceExit: Transition { XAnimator { from: 0; to: -stackView.width; duration: 1000; easing.type: Easing.OutCubic } } initialItem: redRect } Row { spacing: 10 anchors.centerIn: parent Button { text: "red" onClicked: stackView.replace(redRect) } Button { text: "blue" onClicked: stackView.replace(blueRect) } } Rectangle { id: blueRect; color: "blue"} Rectangle { id: redRect; color: "red" } }
- duplicates
 - 
                    
QTBUG-57266 StackView: pushing the already topmost item visually clears the stack
-         
 - Closed
 
 -         
 
- relates to
 - 
                    
QTBUG-61496 StackView: pop() with StackView.Immediate leads to blank StackView
-         
 - Closed
 
 -         
 - 
                    
QTBUG-72881 Setting both pop/push and replace transition results in heap use after free when running in debugger
-         
 - Closed
 
 -         
 
| For Gerrit Dashboard: QTBUG-57267 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V | 
| 275323,9 | StackView: fix an issue where the current item was hidden | 5.14 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 | 
| 308893,1 | StackView: fix an issue where the current item was hidden | 5.12 | qt/qtquickcontrols2 | Status: ABANDONED | 0 | 0 |