fix #LINQT-1853 update popup x if exceed width

This commit is contained in:
Gaelle Braud 2025-07-25 11:24:04 +02:00
parent c0f879bd19
commit b1005eac5d

View file

@ -155,6 +155,10 @@ Button {
if (y < mainItem.height && y + popupHeight > 0) {
x += mainItem.width
}
var globalPos = mapToItem(mainItem.Window.contentItem, x, y)
if (globalPos.x + popupWidth >= mainItem.Window.width) {
x = -popupWidth
}
}
onHeightChanged: Qt.callLater(updatePosition)