How to Create an Empty QImage to Play Around With

Posted on Posted in Qt Tutorials, Tutorials

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 *