PDA

View Full Version : QtColorPicker in Qt designer dialog



mgb
11th January 2010, 06:04
Is there any way to use a qtcolorpicker with a qt designer created dialog?

There is no option to insert a qtcolorpicker widget, can you insert a regular button and override it at runtime with the custom widget?

wysota
11th January 2010, 11:17
Is there any way to use a qtcolorpicker with a qt designer created dialog?
Sure. There are even two ways of doint that.


can you insert a regular button and override it at runtime with the custom widget?
Yes, that's one of the ways. Insert a regular button, right click it and choose "Promote to" (or whatever the option there says), then input proper values for the destination class and confirm everything.

The other way is to provide a Qt Designer plugin for QtColorPicker class which might be a good idea if you plan to use the widget often.