PDA

View Full Version : Display Label Color by selecting Color Picker



sosanjay
23rd September 2009, 07:11
Hi all,

I am using Qt 4.5.2 (32 Bit).

In the Color Picker example it display the color in square box but how can it possible that instead of square box we use label and display color on the label text.


colorView = new ColorViewer(this);

colorView->setColor(colorTriangle->color());

connect(colorTriangle, SIGNAL(colorChanged(QColor)), colorView, SLOT(changeColor(QColor)));

layout = new QGridLayout;

layout->addWidget( colorView, 0, 2, 2, 1);

This is for display color can anyone tell me about Label Text color change.

sosanjay
25th September 2009, 06:11
Can anyone send me the code of similar like Color picker.