PDA

View Full Version : Picture Displaying Qt Desinger



Arshia Aghaei
8th July 2015, 22:05
Hi , i cannot find any item to be a picture viewer...
I need a widget with access to clicked() signal.
Which one will give me this option ?

anda_skoa
8th July 2015, 22:39
QLabel can be used to display an image, or a pixmap item in a graphics scene, or any custom widget using QPainter to draw the image.

Buttons have a clicked() signal, but you can add mouse event handling to whatever widget you have.

Cheers,
_

Arshia Aghaei
13th July 2015, 15:17
QLabel can be used to display an image, or a pixmap item in a graphics scene, or any custom widget using QPainter to draw the image.

Buttons have a clicked() signal, but you can add mouse event handling to whatever widget you have.

Cheers,
_

How to add the events ?

anda_skoa
13th July 2015, 16:58
By overwriting the virtual mousePressEvent() and mouseReleaseEvent() methods, potentially more if you need more advanced event handling.

Cheers,
_