RowLaoyut reload/refresh after dynamic anchoring
Unsolved
QML and Qt Quick
-
Hi all, i have a RowLayout and depending on some variable i have to change its anchoring. (So it is displayed centerd and from right to left)
Unfortunately it cannot reload when the connection triggers, is there any way to refresh it?
Code:
Item { id: container implicitHeight: layout.implicitHeight implicitWidth: layout.implicitWidth RowLayout { id: layout Connections { target: container onVariableChanged: { if (container.variable.includes("fullScreen")) { layout.anchors.left = undefined layout.anchors.right = undefined layout.anchors.horizontalCenter = container.horizontalCenter } else { layout.anchors.horizontalCenter = undefined layout.anchors.left = container.left layout.anchors.right = container.right } } } SomeItems{...