Thanks jpn
but I guess they have removed that QLabel::textInteractionFlags support from Qt4, b'coz its no more existing over there.
so will using that flag, affect the application in a way or the other?
Thanks
Thanks jpn
but I guess they have removed that QLabel::textInteractionFlags support from Qt4, b'coz its no more existing over there.
so will using that flag, affect the application in a way or the other?
Thanks
Well actually, QLabel::textInteractionFlags() was introduced in Qt 4.2. You must be using a pretty old version of Qt since the current version of Qt is already at 4.3.2.![]()
J-P Nurmi
ok now just an extention to this question:
considering the example I've given above, if I've couple of links together over there, for 'pagenumber' and 'totalpages', then how do I distinguish between these two? b'coz all I'll get is the linkActivated() signal, but on which basis I've to decide whether to navigate to or fro??
plz help
Thanks
linkActivated() has a QString parameter that contains the URL of the link clicked. So by changing the href attribute of the link you may add 'labels' to those links.
:? can you plz elaborate it a little more for me?
it will be really appreciable if you'll provide a short snippet as an example for it.
Thanks
Qt Code:
label->setText("Here's some HTML with <a href='abc'>a couple</a> of <a href='def'>links</a>"); connect(label, SIGNAL(linkActivated(const QString&)), receiver, SLOT(doSomething(const QString&))); void Receiver::doSomething(const QString& link) { // do something with 'link' which is either "abc" or "def" }To copy to clipboard, switch view to plain text mode
Last edited by jpn; 10th October 2007 at 13:34. Reason: extended the example a bit
J-P Nurmi
Thank you very much jpn and wysota, for generous help in this regard
Its really appreciable that how helpful can this forum prove for a novice like me
Thanks again
Bookmarks