actually it should be:
connect(label_2, SIGNAL(linkActivated(const QString & )), this, SLOT(myslot(const QString &)));
actually it should be:
connect(label_2, SIGNAL(linkActivated(const QString & )), this, SLOT(myslot(const QString &)));
Thanks for the help. I'll try it out tonight.
This is probably a dumb question, but what does the (const QString & ) reference?
From the docs:
void QLabel::linkActivated ( const QString & link ) [signal]
This signal is emitted when the user clicks a link. The URL referred to by the anchor is passed in link.
This function was introduced in Qt 4.2.
The slot can have no arguments, but I doubt you'll be able to do anything useful then![]()
OK. Thanks again. I'm not trying to open a link. I'm filling a QPUListView object with QLabel objects. This would be similar to some of the Task Panel tasks you see on some .Net applications. When the user clicks the label, it needs to emit a signal so the connected slot can be executed. Hopefully the linkActivated signal will work.
Thanks Guys. That worked. Once I realized how to set the anchor and link via QT Designer, it worked perfectly.
Glenn
Bookmarks