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:
![](https://static.packt-cdn.com/products/9781788397827/graphics/assets/6c4c1e46-259b-4888-a009-0a1ddbbac18c.png)
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...