Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.9.0
-
Windows 10, Ubuntu 10.04.2
Qt 5.7.1/5.9.0
-
cca6e8e3bd80824ff5aa3e17995a5b46ad48be28
Description
The following code worked in Qt 5.7:
import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") Component.onCompleted: { tumbler.currentIndex = 2 } Row { Tumbler { id: tumbler model: 5 // ... } Label { text: tumbler.currentItem.text } } }
In Qt 5.9, setting the index doesn't work, and the binding logs the following error message:
qrc:/main.qml:19: TypeError: Cannot read property 'text' of null
Attachments
Issue Links
- relates to
-
QTBUG-62196 [REG 5.7.1->5.9.1] Thumbler emit onCurrentIndexChanged when created for no reason
-
- Closed
-
For Gerrit Dashboard: QTBUG-61374 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
197273,1 | Fix regression with Tumbler initialization | 5.9 | qt/qtquickcontrols2 | Status: DEFERRED | -1 | 0 |
199097,8 | Tumbler: fix regression with currentIndex and currentItem | 5.9 | qt/qtquickcontrols2 | Status: MERGED | -2 | 0 |