View Full Version : creating a hyperlink

16th February 2006, 20:40
I'm working with a dialog box in Qt 3.2.1 and I'm trying to create a hyperlink using either a text edit or a text label. I tried the following with both:

<a href="mailto:mail@host.com">click here</a>

With the text edit, the tags were displayed along with the text. With the text label, the words "click here" were displayed and were blue and underlined, but the link didn't exist (nothing happened when I clicked on or moved my mouse pointer over the words).

What am I missing?

22nd February 2006, 00:49
This is the expected behaviour. QLabel doesn't handle clicking of links. In fact Qt is unable to just "open a browser" and go to the link.

You can try this:


This is a QLabel, based on KURLLabel, that has a signal for when it is clicked. Note however, that you still have to handle openning of the browser yourself in the connected slot.

Here's some info regarding that: