PDA

View Full Version : QPushButton, stylesheets, text alignment



SiLiZiUMM
4th July 2007, 20:03
Is it possible to control the text alignment (horizontal & vertical) on a QPushButton using stylesheets, or do I have to subclass QAbstractButton and make my own?

jpn
4th July 2007, 20:53
Is it possible to control the text alignment (horizontal & vertical) on a QPushButton using stylesheets
To me it looks like it's not possible.


or do I have to subclass QAbstractButton and make my own?
I think you could subclass QPushButton instead of QAbstractButton. This will save you from quite a bit of work. All you need is a bit different rendering so it could be done in reimplemented paintEvent().