PDA

View Full Version : QLabel Painting



vijay anandh
15th May 2006, 07:58
Hi All

I am vijay using VS 2005 with Qt integration ( 4.1 ). Currently i am in Image processing. What i want is , The labels border color should be as a white color. I have attached that bmp file. Can you see that file and give correct solution to solve that problem

looking forward your favourable reply

Thanks and regards
vijay

zlatko
15th May 2006, 08:15
First of all i havent see atached image :)
But i give you my own ;)
If it that what you want i tell you how i do that ...
- change frame shape for label diferent an NoFrame ;
- change paletteForeground on white

p.s. i do it with Qt 3.3.5 so i cant surly say that it will be correct on Qt 4

jacek
15th May 2006, 11:00
I have attached that bmp file.
Please, don't attach BMPs --- even M$ Paint can save images in PNG, JPEG or GIF format.

vijay anandh
15th May 2006, 12:22
Hi

thanks for your mail. Exactly i want that type of style. , But setPaletteForeground is not working. Can you tell me what will be exact function.

thanks and regards
vijay

jpn
15th May 2006, 13:12
label->setFrameStyle(QFrame::Plain | QFrame::Box);
label->setLineWidth(3);
QPalette pal = label->palette();
pal.setColor(label->foregroundRole(), Qt::white);
label->setPalette(pal);