diff --git a/src/controls/templates/OverlaySheet.qml b/src/controls/templates/OverlaySheet.qml --- a/src/controls/templates/OverlaySheet.qml +++ b/src/controls/templates/OverlaySheet.qml @@ -146,6 +146,9 @@ } } onWidthChanged: { + if (!contentItem.contentItem) + return; + var width = Math.max(root.width/2, Math.min(root.width, root.contentItem.implicitWidth)); contentItem.contentItem.x = (root.width - width)/2 contentItem.contentItem.width = width;