Qt Tutorials For Beginners – QColorDialog Example

QT Color Dialog Demo

In this lesson we will learn how to use QColorDialog in qt.

The QColorDialog class provides a dialog widget for specifying colors.

File->New File or Project…

Applications->Qt Gui Application->Choose…

We keep the class as MainWindow as given by default.

Now write the code shown below in main.cpp


Now run the code and see the output.

QColorDialog Output
QColorDialog Output


On terminal you will see the chosen color code


Partner Sites




Stuff I use to make videos

Windows notebook – http://amzn.to/2zcXPyF

Apple MacBook Pro – http://amzn.to/2BTJBZ7

Desktop - http://amzn.to/2zct252

Microphone – http://amzn.to/2zcYbW1

notebook mouse – http://amzn.to/2BVs4Q3

Screen Recording Software – Camtasia