I use the follow code to set the background color of a a QLabel:
QColor colorrgb
(x
*255,y
*255,z
*255);
plalette.
setColor(QPalette::Window,colorrgb
);
colorlabelreal->setAutoFillBackground(true);
colorlabelreal->setPalette(plalette);
QColor colorrgb(x*255,y*255,z*255);
QPalette plalette;
plalette.setColor(QPalette::Window,colorrgb);
colorlabelreal->setAutoFillBackground(true);
colorlabelreal->setPalette(plalette);
To copy to clipboard, switch view to plain text mode
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
Bookmarks