Best clickable widget for color swatch?
-
I am looking for a widget for display a color swatch. I need to set the
color to display and receive a signal when it's clicked.I can't seem to find an existing QWidget that does both. Just want to
make sure there's indeed no such canned one before I build my own.Thanks.
-
Hi Stephen,
How about "QColorDialog":http://doc.qt.nokia.com/4.7-snapshot/qcolordialog.html#details?
Is this what you are lookinf for?Regards,
wladek -
should not be hard to build on yourself
just derive from QLabel, overwrite mouseClickEvent() and calls QColorDialog::getColor.
Then call setbackgrounfdColor for the label.PS: all functions are just logical names, I did not look up the correct ones in the docs.