How to draw bitmap from external file on the form?
I am using QT Creator 3.5.0 on Ubuntu 15.10. I have one form (mainwindow.ui) and I draw one GraphicView object (QGraphicsView) and one button (QPushButton). Signal on_pushButton_clicked() is created.
How to draw image from external file (BMP/ JPG/ PNG) on GraphicView object (that already exists) on the specific coordinates inside GraphicView object (x, y) when I click on the QPushButton?
Re: How to draw bitmap from external file on the form?
Create a QPixmap object, let it load the file, put it into a new QGraphicsPixmapItem, put that into the view's scene, move it to the position you want it to be.
Cheers,
_