How to place an image on a QWidget that will open a browser and go to Google when you click on the picture?
+4
A:
Handle the mousePressEvent
and then open the link using QDesktopServices::openUrl
.
humbagumba
2010-06-11 09:10:30
It works fine. Only mouse does not change its shape (need to become a hand) whan it's on the picture.
Narek
2010-06-11 11:49:31
Just need to be added myQWidget->setCursor(Qt::PointingHandCursor); and it is perfect!
Narek
2010-06-11 11:55:07
You're welcome.
humbagumba
2010-06-11 12:06:30