Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.2.1
-
Windows 7/64 Ultimate
Description
I have a tabbed qml interface (QtQuick 2.2). In one tab there is a parent groupbox and a child groupbox. The child groupbox contains a text area that should expand to consume all available space. I can get the app to behave the way I want. I don't understand why the nested groupbox generates a qml binding loop error on implicitWidth. I'm attaching the entire project but here's a summary of the QML
In the main.qml under ApplicationWindow (all import statements elided)
TabView { id:frame anchors.fill: parent anchors.margins:5 Tab{ id: setupPage //NOTE if I don't mark active as true then this tab doesn't get created //until it is clicked on. Not good for trying to set things up. active:true objectName:"TabParentOfSetup" enabled: true title: "Setup" SetupTab { } } }
SetupTab.qml looks like this
GroupBox{ title:qsTr("GroupBoxTitle") signal notifyEvent() anchors.fill: parent anchors.margins: 11 ColumnLayout{ anchors.fill: parent MyTestRow{ Layout.fillHeight: true Layout.fillWidth: true } } }
Then MyTestRow.qml has
GroupBox{ anchors.margins: 10 title:qsTr("Instrument Messages") id:myRow RowLayout{ anchors.fill: parent TextArea { id:msgTextBox Layout.fillWidth: true Layout.fillHeight: true } } }
The full error message is
Line 14 is the one where MyTestRow is created.qrc:///SetupTab.qml:14:9: QML GroupBox: Binding loop detected for property "implicitWidth"
In the real app there are two tabs and in main.qml for the second tab I had to add the active:true property or the tab didn't load. Quite by accident while preparing the sample project I discovered that if I comment out the active:true the binding error doesn't happen. Unfortunately this is not an viable work-around for the actual application.