The second time, we have [code] tags here. So please edit your post and add them.

Further what is the need to construct a QImage and immediately convert it to a QPixmap. You also want spend some time and get familiar with layouts, how to use them and where you have to apply them. Start with the documentation.