PDA

View Full Version : how to get the color of dialog



boss_bhat
1st August 2006, 09:24
516
How to get the color of the window and set it in the edit part of the list view, I tried hardcoring It works for only motif style not for plastique,

QPalette listPalette= list->palette();

listPalette.setColor(QPalette::Base,QColor(Qt::lig htGray));
list->setPalette(listPalette);

Can some body explain how to get the color of the dialog/window?
Boss

jacek
1st August 2006, 11:42
QPalette listPalette( list->palette() );
listPalette.setColor( QPalette::Base, listPalette.color( QPalette::Window ) );
list->setPalette( listPalette );