fix #LINQT-1853 update popup x if exceed width
This commit is contained in:
parent
c0f879bd19
commit
b1005eac5d
1 changed files with 4 additions and 0 deletions
|
|
@ -155,6 +155,10 @@ Button {
|
||||||
if (y < mainItem.height && y + popupHeight > 0) {
|
if (y < mainItem.height && y + popupHeight > 0) {
|
||||||
x += mainItem.width
|
x += mainItem.width
|
||||||
}
|
}
|
||||||
|
var globalPos = mapToItem(mainItem.Window.contentItem, x, y)
|
||||||
|
if (globalPos.x + popupWidth >= mainItem.Window.width) {
|
||||||
|
x = -popupWidth
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onHeightChanged: Qt.callLater(updatePosition)
|
onHeightChanged: Qt.callLater(updatePosition)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue