Hi All,
I m using Qt 4.1.5 on my Intel Mac.
I want to create a Link in Qt. I can make a Link in Qt 4.2.2 but Actually QT 4.2.2 does not give support to MAC 10.2 so I have to use Qt 4.1.5.
So If anybody knws then plz help me.
Thanks.
Printable View
Hi All,
I m using Qt 4.1.5 on my Intel Mac.
I want to create a Link in Qt. I can make a Link in Qt 4.2.2 but Actually QT 4.2.2 does not give support to MAC 10.2 so I have to use Qt 4.1.5.
So If anybody knws then plz help me.
Thanks.
Sub class QPushButton
reimplement all of these events
virtual void enterEvent(QEvent *);
virtual void leaveEvent(QEvent *);
virtual void paintEvent(QPaintEvent *);
You can change mouse cursor when mouse enter
and change back when mouse leave
painter use for Draw Text look like link color
Or use a QLabel or QWidget to do the same thing, because QPushButton is too "heavy" for such a small task.
Regards.
Link?? a href link or start a link file like a pdf same as terminal:
mac:
open file.pdf
http://doc.trolltech.com/4.2/qdesktopservices.html
Code:
/* qt2 > */ { qDebug() << "#### OpenDesktop " << loc; #if defined Q_WS_WIN /* QUrl(winbuh) */ if (!wr) { } return; #endif if (!r) { } } /* qt2 < */ void ClassName::OpenUrl_File_Dir_Dektop() { #if defined(Q_WS_WIN) QProcess p; QStringList s; s << "url.dll,FileProtocolHandler" << "http://www.qtforum.de/forum/"; #endif #if defined Q_WS_MAC QProcess m; QStringList macs; macs << "http://www.qtforum.de/forum/"; /* oeffnet der default browser */ #endif }
ONLY on MAC!
IMO...
if you show last line from http://www.qtforum.de/forum/viewtopic.php?t=2366 only source ...
you can make applescript and set image backround or other 1000 way applescript ... like make a coffe...
Patrick... the question was about Qt 4.1. And it was about displaying a link and not opening pdf files...
Thanks for Reply.
But as Wysota said question was how to create hyperlink in Qt 4.1.5 not in Qt 4.2.
Look at posts #2 and #3.
Regards