weixj2003ld
19th December 2011, 00:30
I use the follow code to set the background color of a a QLabel:
QColor colorrgb(x*255,y*255,z*255);
QPalette plalette;
plalette.setColor(QPalette::Window,colorrgb);
colorlabelreal->setAutoFillBackground(true);
colorlabelreal->setPalette(plalette);
but the follow error occur:
error C2039: 'hwnd' : is not a member of QPalette
error C2275: 'HWND' : illegal use of this type as an expression
QColor colorrgb(x*255,y*255,z*255);
QPalette plalette;
plalette.setColor(QPalette::Window,colorrgb);
colorlabelreal->setAutoFillBackground(true);
colorlabelreal->setPalette(plalette);
but the follow error occur:
error C2039: 'hwnd' : is not a member of QPalette
error C2275: 'HWND' : illegal use of this type as an expression