How can I dynamically change the color of a QFrame border (shape = box, shadow = plain) ?
Thanks
How can I dynamically change the color of a QFrame border (shape = box, shadow = plain) ?
Thanks
Does a QFrame have Disabled, Active and Inactive states that can be set to change its color or is changing the palette the only way to do this?
Thanks
Use QPalette::setColor(ColorGroup gr, ColorRole r, const QColor & c) where the color group is one of the following:
- QPalette::Disabled
- QPalette::Active
- QPalette::Inactive
- QPalette::Normal
J-P Nurmi
OK, but what ColorRole do I use?
Thanks
Experiment. There is a preview if you use Designer. There is also another possibility if you use 4.2 - String (aka Style) Sheets.
gimel (16th October 2008)
Under Vista+Qt 4.4.1, QPalette is not functional for this. Use frame->setStyleSheet("color:red") to change the border color.
Bookmarks