In the following section, we will move over to the realm of pixels and learn how to create a paint program using Qt. Users will be able to express their creativity by using different sizes and colors of the brush to draw pixel images!
Creating a paint program
Setting up a user interface
Again, for this example, we will create a new Qt Widget Application. After that, open up mainwindow.ui and add a menu bar to the main window. Then, add the following options to the menu bar:

We have three menu items on the menu bar—File, Brush Size, and Brush Color. Under the File menu are functions for saving the canvas into a bitmap file, as well as clearing the entire canvas. The Brush Size category contains different options for...