Qt C++ Tutorials For Beginners – Setting Icon on QMessageBox




Qt  C++ Tutorials For Beginners – Setting Icon on QMessageBox

The code below shows how to set custom icons on QMessageBox using qt creator.

Step 1 – File->Other Project->Empty Qt Project

When we create aEmpty Qt Project There is nothing in the Project explorer, and even the .pro file has nothing in it. So, we need to create a main.cpp file.

Step 2 – Right Click on Project -> Add New -> C++ -> C++ Source file -> Choose

And Give the name main.cpp file and press finish.

main.cpp

.pro file

Setting Icon on QMessageBox
Setting Icon on QMessageBox


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com