[Qt-interest] QPushButton with menu but without menu-indicator

Oliver Demetz forenbeitraege at oliverdemetz.de
Tue Jul 7 11:52:36 CEST 2009


Hi!

I've got a QPushbutton with an associated QMenu.

How can I make the menu-indicator not being shown amymore ?

Also, since the text in my button is right-aligned, I tried to move the 
menu-indicator to the left side of the button via:


MyWidget > QPushButton {
	text-align: right;
}

MyWidget > QPushButton::menu-indicator {
	subcontrol-position: left bottom;
	subcontrol-origin: content;
}

which works, but the padding at the right side of the button that was 
previously needed for the indicator is still there.
This is not nice since I have several QPushButtons under each other with 
right-aligned text. Those buttons with an associated menu have their 
text aligned a bit more to the left than those without a menu.

Best regards,
Oliver



More information about the Qt-interest-old mailing list