Hi, i am using qt 4.1.0 on a window xp platform. I use the appraoch below to set the label's forefround and Window color but nothing happens. I have serch every where for clues to solve this but to no avale. I greatly appreciate any help. Thanks
QPalette temp;
temp.setColor(QPalette::Foreground, QColor(255, 0, 0));
temp.setColor(QPalette::Window, QColor(0, 0, 0));
for (int i = 0; i < iColSize; i++)
{
ptrLbl = new QLabel(this);
ptrLbl->setObjectName("XXX");
ptrLbl->setGeometry( X,X,X,X );
ptrLbl->setFrameShape( QFrame::StyledPanel );
ptrLbl->setAlignment( int( Qt::AlignLeft ) );
ptrLbl->setMouseTracking(true);
ptrLbl->setPalette(temp);
}
Bookmarks