How can I make a QLabel clickable?
I am trying to make an About.. dialog with a clickable image without buttons.
How can I make a QLabel clickable?
I am trying to make an About.. dialog with a clickable image without buttons.
MacOSX user dabbling with Linux and Windows.
reimplement mousePressEvent in QLabel class and emit your custom signal
see this link
http://doc.trolltech.com/3.3/qwidget...ousePressEvent
Last edited by wagmare; 29th July 2009 at 06:59. Reason: showing the link for mousePressEvent
"Behind every great fortune lies a crime" - Balzac
Thanks for the advice.
I replaced the QLabel with a big flat QPushButton and used setIcon(pixmap).
I also added the clicked() signal and accept() slot for it in the .ui.
It was the simplest way, works perfectly.
Again, thanks.
MacOSX user dabbling with Linux and Windows.
Bookmarks