PDA

View Full Version : Disabling does not gray-out buttons



lotek
12th October 2010, 11:00
Hi,

Qt 4.6
openSuSE 11.2

QApplication style set to "plastique" or "oxygen".

I'd like to disable a QPushButton with setEnabled(false). The button is disabled (no clicks are possible), but not grayed-out. Somehow stupid for the user.

With the QQApplication style set to "motiff" the button view slightly changes, but still is not gray-out and looks ugly.

What to do ?

Thanks

me :)

squidge
12th October 2010, 13:22
Override paintEvent ?

lotek
12th October 2010, 14:11
Hi,

I've modified the palette, but I've used the
QPalette::setColor( ColorRole role, const QColor & color ), instead of
QPalette::setColor ( ColorGroup group, ColorRole role, const QColor & color )
so I've changed all color groups instead of active color only.

Thanks for help

me :)

ChrisW67
13th October 2010, 03:19
Curious, works fine here on Gentoo with 4.6.3. This is motif, plastique and oxygen styles from top to bottom:
5322

lotek
13th October 2010, 10:48
Thank you ChrisW67, as I already wrote (see above) it was my bug.
By the way - how to mark a thread noticeably as resolved or finished, so the it is not continued any more ?

greetings