You can use the overlap
property to shift the submenu over to the position you want.
Note that if the position of the menu is too close to the left or right edge of the window, it will still open on the opposite side.
Menu {
id: right_menu
property var rtl: true;
MenuItem {
text: "گزینه ۱"
LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
}
Menu {
title: "تنظیمات"
overlap: width * 2 // <<-- Shift the submenu over
MenuItem {
LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
text: "گزینه ۱"
}
MenuItem {
LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
text: "گزینه ۱"
}
}
delegate: MenuItem {
LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
}
}
CLICK HERE to find out more related problems solutions.