Non-editable QComboBox text alignment



  • 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!



  • HI and welcome to devnet,

    I think you should try to write your own QStyle


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.