I just found out that this code works where the other code snippets you suggested didn't work for me:
//grpControls is a QGroupBox which is parented to another widget
palette.
setColor(grpControls
->backgroundRole
(),
QColor(0,
255,
255));
//grpControls is a QGroupBox which is parented to another widget
palette.setColor(grpControls->backgroundRole(), QColor(0,255,255));
To copy to clipboard, switch view to plain text mode
In all the code you supplied the group box was not parented, or its parent was not visible in the code supplied... I think it plays a role in this behaviour.
Another thing that bothers me is when I try to set the frame color with designer no color role changes the frame color...
Can you confirm this?
Thanks for your help!
Bookmarks