How to Create an Empty QImage to Play Around With

You can create a QPixmap and convert it to QImage if you just want to have a QImage for modification and manipulation. Here, you can use the following code to achieve this:

int width = 100;
int height = 200;
QImage image = QPixmap(width, height).toImage();

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.