PDA

View Full Version : How to center-align QComboBox's drop down button?



alexcodercpp
23rd March 2017, 20:56
By default, the QComboxBox's drop down button is right-aligned, but I need it to be placed in the center.
I know I should use setStyleSheet method taking a string in a css-like language, which I'm absolutely clueless about.
So I came here to ask you help me with this QStyleSheet stuff.
Thanks in advance for possible solutions.

Ginsengelf
24th March 2017, 13:28
Hi, did you have a look at the examples (http://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qcombobox)? I think you would need to play with QComboBox::drop-down, although I have no idea why you would want to place the button in the center instead of left or right.

Ginsengelf