Non-editable QComboBox text alignment
General and Desktop
2
Posts
2
Posters
2.8k
Views
2
Watching
-
wrote on 17 Sept 2015, 11:00 last edited by FrankE
As well as align text on a editable one is pretty straightfoward in code:
mycb->lineEdit()->setAlignment(Qt::AlignRight);it doesn't work on non-editable (there is no lineEdit), I could make lineEdit read-only, also disable it but you cannot click there to change the item (that's a pitty)
Anyone knows a tip to make this change on a non-editable QComboBox?
Regards!
-
wrote on 17 Sept 2015, 19:06 last edited by
HI and welcome to devnet,
I think you should try to write your own QStyle
1/2