-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.7.0
-
None
-
Ubuntu 14.04 GCC 4.8.4
Microsoft Windows 7 MinGW 5.3.0
-
342c72da64cac4aec1463091f6fe0bfb16cd1850
Program crashes on exit when layout (exist as ListView delegate) contains nested child layouts and any custom property. This situation occurs only if ListView turn to invisible state.
Example:
main.qml
import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 ApplicationWindow { visible: true width: 640; height: 480 ColumnLayout { anchors.fill: parent RowLayout { Layout.alignment: Qt.AlignCenter Button { text: 'first page' onClicked: __stackLayout.currentIndex = 0 } Button { text: 'second page' onClicked: __stackLayout.currentIndex = 1 } } StackLayout { id: __stackLayout Layout.fillHeight: true; Layout.fillWidth: true ListView { model: 50 delegate: __delegate Layout.fillHeight: true; Layout.fillWidth: true } ListView { model: 70 delegate: __delegate Layout.fillHeight: true; Layout.fillWidth: true } } } Component { id: __delegate ColumnLayout { property bool bug: true /* IF REMOVE PROPERTY 'bug' OR REMOVE layout '__childLayout' CRASH WILL DISAPPEAR. */ width: ListView.view.width RowLayout { id: __childLayout Layout.alignment: Qt.AlignCenter Text { text: 'This is row № ' Layout.fillHeight: true } Text { text: index; Layout.fillHeight: true } } Rectangle { height: 1; color: 'red' Layout.fillWidth: true } } } }
For Gerrit Dashboard: QTBUG-55103 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
181138,3 | QQuickItem destructor: do less during QQuickWindow destruction | 5.8 | qt/qtdeclarative | Status: ABANDONED | -1 | 0 |
181416,6 | Avoid needless notifications when destroying layouts | 5.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |