Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.2
-
None
Description
Minimal example:
import QtQuick import QtQuick.Controls import QtQuick.Layouts import QtQuick.Templates as T ApplicationWindow { width: 800 height: 600 title: "QTBUG-92983 - contentWidth " + control.contentWidth + " contentHeight " + control.contentHeight visible: true Shortcut { sequence: "Ctrl+Q" onActivated: Qt.quit() } Button { text: "Open" onClicked: fileDialog.open() } T.Dialog { id: control objectName: "dialog" // control.contentWidth (indirectly) refers to control.contentItem.implicitWidth implicitWidth: Math.max(600, control.contentWidth) implicitHeight: Math.max(400, control.contentHeight) visible: true background: Rectangle { objectName: "backgroundRect" color: control.palette.window border.color: control.palette.dark } // contentItems always fill the availableWidth/Height (see QQuickControlPrivate::resizeContent()) contentItem: ColumnLayout { objectName: "fontDialogOuterColumnLayout" onImplicitHeightChanged: print("implicitHeight of " + objectName + " changed: ", implicitHeight) // Implicitly fills. ColumnLayout { objectName: "fontDialogInnerColumnLayout" onImplicitHeightChanged: print("implicitHeight of " + objectName + " changed: ", implicitHeight) TextEdit { // TextField works id: styleEdit objectName: "styleEdit" text: "Enter style here" topPadding: 0 bottomPadding: 0 Layout.fillWidth: true onImplicitHeightChanged: print("implicitHeight of " + objectName + " changed: ", implicitHeight) Button { text: "x" width: height height: parent.height anchors.right: parent.right visible: styleEdit.length > 0 onClicked: styleEdit.clear() } } Rectangle { objectName: "dummyLayoutRect" color: "transparent" border.color: "darkorange" Label { text: "This should always fill" anchors.centerIn: parent } Layout.fillWidth: true Layout.fillHeight: true } } } } }
The original code can be seen here:
It uses a GridLayout, but ColumnLayout reproduces it too.
Attachments
Issue Links
- resulted from
-
QTBUG-87799 Implement non-native FontDialog
- Closed