views:

35

answers:

1

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
It works fine. Only mouse does not change its shape (need to become a hand) whan it's on the picture.
Narek
Just need to be added myQWidget->setCursor(Qt::PointingHandCursor); and it is perfect!
Narek
You're welcome.
humbagumba