I have a long QPushButton
(well, a subclass of one) with a menu attached. The drop-down menu indicator is on the right side of the button, but when pressed the menu drops down from the bottom-left corner. This seems to me like it will be clunky and unintuitive for my users.
I've looked through the QPushButton
source code, and tried:
this->setLayoutDirection(Qt::RightToLeft);
which did move the menu to the right side, but it broke the button as it also moved the indicator to the left side and made the menus backwards.
Is there another way to make the menu drop from the right side?
It can be done by installing an event filter on the menu used for the
QPushButton
which moves it when shown.