Qt Color Picker Widget?

Freedom_Ben picture Freedom_Ben · Aug 15, 2013 · Viewed 19.5k times · Source

I have a QDialog subclass that presents some options to the user for their selecting. One of these options is a color. I have seen the QColorDialog, and I need something much simpler, that is also a regular widget so I can add to my layout as part of my dialog. Does Qt offer anything like this or will I have to make my own? If the latter, what is the best strategy?

Answer

Daniel Hedberg picture Daniel Hedberg · Mar 25, 2014

Have you looked at the QtColorPicker, part of Qt Solutions?

QtColorPicker

QtColorPicker provides a small widget in the form of a QComboBox with a customizable set of predefined colors for easy and fast access. Clicking the ... button will open the QColorDialog. It's licensed under LGPL so with dynamic linking and proper attribution it can be used in commercial software. Search for QtColorPicker and you'll find it. Here's a link to one site that hosts many of the Qt Solutions components:

https://github.com/pothosware/PothosFlow/tree/master/qtcolorpicker