QImage image; image.load("image.png");
QImage image(100, 100, QImage::Format_RGB888); image.fill(Qt::red);In this case, a 100x100 pixel image is created with the RGB color format and filled with the color red. QImage is part of the Qt GUI module, so it is included in the Qt GUI library.