Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.0 Alpha
-
None
-
5e7d7dfc07ea00b53873a6ad5399f2400781f8b9
Description
Even if TabBar has items and even if it has explicitly set currentIndex, it resets it to -1
import QtQuick 2.5 import QtQuick.Layouts 1.3 import Qt.labs.controls 1.0 ApplicationWindow { visible: true width: 640 height: 480 ColumnLayout { anchors.fill: parent TabBar { id: tabBar Layout.fillHeight: false Layout.fillWidth: true // currentIndex: 0 TabButton { text: "Test" } } StackLayout { Layout.fillHeight: true Layout.fillWidth: true currentIndex: tabBar.currentIndex Rectangle { anchors.fill: parent color: "red" } } } }
To display the red rectangle, you should click on tab button. Even if you uncomment line and set currentIndex explicitly, it would reset back to -1.
Attachments
For Gerrit Dashboard: QTBUG-48624 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
127105,3 | Fixed TabBar reset currentIndex to -1 on completion | 5.6 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |