Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.10.1, 5.15.0
-
cc77a0bc549ce8f0b218661e7ae0e82e5b89e0da, a5d2fd816bcbee6026894927ae5d049536bfc7ea
Description
When there is any control that as mainItem has a layout (RowLayout, GridLayout, ColumnLayout) in which there is a Label that has word wrap on, if the control implicitHeight is based on contentItem's implicitHeight there will always be a binding loop
note that most styles do indeedbase the control implicit size from contentItem, so it's likely to be a problem for any standard control
Example:
import QtQuick 2.12 import QtQuick.Window 2.3 import QtQuick.Controls 2.5 import QtQuick.Layouts 1.12 ApplicationWindow { id: mainWindow visible: true Control { implicitWidth: 600 implicitHeight: lay.implicitHeight contentItem: RowLayout { id: lay onImplicitHeightChanged: print("layout implicitHeight "+implicitHeight) Label { onImplicitHeightChanged: print("label implicitHeight "+implicitHeight) Layout.fillWidth: true wrapMode: Text.WordWrap text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id risus id augue euismod accumsan. Lorem ipsum dolor sit amet, " + "consectetur adipiscing elit. Nullam id risus id augue euismod accumsan.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam id risus id augue euismod accumsan." } } } }