PDA

View Full Version : Bitmap buttons



BloodHo
4th November 2006, 13:10
Hello,

I'm new at QT, installed it couple hours ago and now i'm trying to figure out how to make custom buttons. I mean i want to put a bitmap texture on a button and i can't seem to figure out how its done. It's prolly told somewhere in help file but i just can't find it :)

How about buttons that are different shapes than a box, how are those done?

Thanks!

wysota
4th November 2006, 14:17
General answer is "it depends on what you exactly want to achieve". In the simplest case you might just want to set an icon for the button (for example using QAbstractButton::setIcon() and making the button flat through the flat property). If you want something more complicated, you might need to subclass QPushButton or QToolButton and override its paintEvent.