PDA

View Full Version : [SOLVED] QT button with a picture that can be grayed out?



Zorgoth
February 2nd, 2010, 07:36 AM
I am making a GUI in QT. This is my second QT project; my first was a simple 2D graphing program. I am very new to it and the grapher was made a long time ago so I forgot a lot since then. For now I want to be able to make a square button with a picture of my choice on top of it and with the option to "grey it out" when necessary so it can't be pressed. How can I do that?

daasdingo
February 2nd, 2010, 08:03 AM
use a QToolButton to get a square button
and use setEnabled(bool) to grey it out

Zorgoth
February 2nd, 2010, 08:42 AM
Thanks!