Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
5.9.2, 5.9.3, 5.9.4, 5.10, 5.11.1
-
None
-
Happened under Windows (7). Using both MVC and MinGW 32bit compiler.
Description
When using swipeview in combination with a repeater of which the model changes: the application crashes. Small example: when nbOfPages changes by clicking the button, it crashes:
import QtQuick 2.9 import QtQuick.Controls 2.2 ApplicationWindow { width: 640 height: 480 title: qsTr("Tabs") visible: true SwipeView { anchors.fill: parent id: swipeView property int nbOfPages: 4 onNbOfPagesChanged: console.log("onNbOfPagesChanged (now:", nbOfPages, ")") onCurrentIndexChanged: console.log("onCurrentIndexChanged (now:", currentIndex, ")") currentIndex: tabBar.currentIndex Repeater { model: swipeView.nbOfPages onModelChanged: console.log("onModelChanged") Loader { sourceComponent: Button { text: "Increment model count" onClicked: ++swipeView.nbOfPages } } } } header: TabBar { id: tabBar currentIndex: swipeView.currentIndex } }
See also attached demo.
The problem does not occur when using the repeater in e.g. a Column or a StackLayout.
The problem does not arise with qt 5.9.1.
Problem was noticed when upgrading to qt 5.10.0 and then also seen with Qt 5.9.2, Qt 5.9.3 and 5.9.4.
The issue is still present using qt 5.11.1
Attachments
Issue Links
- relates to
-
QTBUG-63729 [REG 5.9.1->5.9.2]: When an item loaded in a loader is destroyed then it can cause children to print warnings that referred to the parent
- Closed
- resulted from
-
QTBUG-61781 Crash when accessing a QML singleton from anonymous function
- Closed