Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.3, 6.2.4
-
None
-
-
95bfd21530 (qt/qtdeclarative/dev) 95bfd21530 (qt/tqtc-qtdeclarative/dev) 242526da1b (qt/qtdeclarative/6.3) 242526da1b (qt/tqtc-qtdeclarative/6.3) 242526da1b (qt/tqtc-qtdeclarative/6.3.1) 30263673a0 (qt/tqtc-qtdeclarative/6.2)
Description
When the height of a Popup exceeds the window size and the content changes the Popup isn't resized. To reproduce this issue run the following example and click on the background. This will set the model of both ListView to 5 and so the content height is changed/reduced. Only the Popup with the initial model that fits on the screen will shrink properly. The contentHeight of both popups is calculated properly when outputting it on change, but the popup which is cut off isn't redrawn. When resizing the window it will look proper again.
import QtQuick import QtQuick.Controls Window { width: 640 height: 480 visible: true title: qsTr("Hello World") Popup { id: popupGood width: 100 implicitHeight: contentItem.implicitHeight padding: 1 closePolicy: Popup.NoAutoClose contentItem: ListView { id: listViewGood clip: true implicitHeight: listViewGood.contentHeight model: 20 delegate: Text { text: modelData } ScrollIndicator.vertical: ScrollIndicator {} } background: Rectangle { border.color: "#21be2b" } } Popup { id: popupBad x: 120 width: 100 implicitHeight: contentItem.implicitHeight padding: 1 closePolicy: Popup.NoAutoClose contentItem: ListView { id: listViewBad clip: true implicitHeight: listViewBad.contentHeight model: 100 delegate: Text { text: modelData } ScrollIndicator.vertical: ScrollIndicator {} } background: Rectangle { border.color: "#21be2b" } } MouseArea { anchors.fill: parent onClicked: { listViewGood.model = 5 listViewBad.model = 5 } } Component.onCompleted: { popupGood.open() popupBad.open() } }