Details
-
Suggestion
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.2.0
-
None
Description
On of our customers suggests new behavior for QToolButton's MenuButtonPopup mode.
The QToolButton's popup mode MenuButtonPopup creates an arrow button that is placed next to the tool button. This may be ok if there are only few buttons, but in a toolbar with many buttons (several of which shall get a history list) this wastes a lot of real-estate.
Could you please either change this mode, or implement an additional one, so that it behaves as follows:
- If the QMenu assigned to the button is empty, only the normal button shall be visible (no arrow, nothing extra).
- If the QMenu is not empty, display a small, black, downward arrow in the lower right corner of the button - do this without changing the size of the button! The arrow shall be inside the button area.
- If the user positions the mouse cursor in the lower right corner of the button, change the color of the arrow from black to white to indicate that a click here will open the history menu. Go back to black if the mouse is moved outside that area.
- Dynamically react on whether the menu is empty or not and add/remove the arrow accordingly.
- Optionally also open the menu if the user does a long click on the rest of the button area.