views:

378

answers:

1

Please tell me how to create a QLabel on the QWidget that has a text that you can click and browser will open the mentioned link.

Please bring here a code snippet.

Thanks!

+4  A: 

check QLabel::setOpenExternalLinks(bool) and set text on label <a href="yourlink">link text</a>

Kamil Klimek
there is an error: Error 1 error C2039: 'setOpenExternalLinks' : is not a member of 'QLabel'
Narek
@Narek: setOpenExternalLinks was introduced in Qt 4.2. What version are you using?
Mihai Limbășan
oops I have been using 4.1.3 Thanks.
Narek