Your solution works--for displaying one image anyway--, but you could make a few improvements.

Firstly, your code leaks memory because the QImage is never deallocated. You could replace image1 with a smart pointer (such as std::unique_ptr), or even not go through a pointer at all: let image1 be a QImage. It will be allocated/deallocated with the containing MiaClasse instance.

Secondly, you had the right intuition by preloading the image instead of loading it from disk in paintEvent(), but you could do even better by using QPixmap instead of QImage. The former is more readily usable by a painter.