PDA

View Full Version : Disable a QRadioButton without disabling its text



ouekah
12th April 2010, 10:36
Hi,

is there a way to disable a QRadioButton without disabling its text ? If you do the following:



QRadioButton button = new QRadioButton(tr("Custom"));
button->setEnabled(false);


This will disable both the button and "Custom".

Actually it doesn't bother me if the text is also disabled. But in this case I would like to modify the text's color from grey to black.

Any suggestions ?

nish
12th April 2010, 10:44
Try setting QPalette::Disabled color to one you want..