ToddAtWSU
1st February 2007, 21:00
I have a requirement to make my Qt 3.3.7 project highly configurable and one requirement is to allow the user to change the background and foreground colors. I have a QSplitter which on the left contains 4 QVGroupBoxes containing QComboBoxes, QLabels, and QLineEdits and on the right side is a QTable. All of my background colors are correct and the same, including inside the menus and submenus. All the text in my menus and in my table headers are correct but the text for the items inside the QVGroupBoxes and the QVGroupBoxes' titles are black even though the rest of the text is red. However, my QComboBoxes inside my QVGroupBoxes are written with red text. Why would the QComboBoxes palettes get the changes but the rest of the objects inside the same QVGroupBoxes would not reflect these changes? I want all my objects to have the same palette as my QMainWindow so I tell the children QVGroupBoxes
mpGroupBox->setPalette( palette( ) );
I do this after setting up the palette for my mainwindow. Does anybody have any suggestions on what I need to do to get the rest of the children to obey the palettes and to get the titles of the QVGroupBoxes to change color. Again, the background colors of all the children are correct, it is just the foreground that half the children don't listen to. I have made sure to set the colors for both the Active and Inactive states thinking this was causing the problem but this did not fix all my issues, just some of them. Thanks for your help!
mpGroupBox->setPalette( palette( ) );
I do this after setting up the palette for my mainwindow. Does anybody have any suggestions on what I need to do to get the rest of the children to obey the palettes and to get the titles of the QVGroupBoxes to change color. Again, the background colors of all the children are correct, it is just the foreground that half the children don't listen to. I have made sure to set the colors for both the Active and Inactive states thinking this was causing the problem but this did not fix all my issues, just some of them. Thanks for your help!