PDA

View Full Version : Adding color wheel to my UI?



Leutzig
19th October 2015, 12:11
Hello,

I found this color wheel online that I'm interested in using in my own UI. But it seems that its position, size etc. are all set within the cpp file and the UI hasn't been used. How do I put the color wheel into my own UI so that I can add some sliders and buttons to it?

The color wheel can be found here:
https://forum.qt.io/topic/19261/colorwheel

Thanks in advance.

//Leutzig

ChrisW67
19th October 2015, 21:10
I assume by "the UI" you mean the Qt Designer components (standalone or in Creator). You can place a generic QWidget in your UI as a placeholder and use the Promote feature to instruct Designer to generate code for a class ColorWheel instead.
http://doc.qt.io/qt-4.8/designer-using-custom-widgets.html

The ability to drag and drop a ColorWheel into the UI and see a colour wheel on the screen will require writing a plugin for Designer.

Leutzig
19th October 2015, 23:11
Thanks a lot! Worked perfectly :)