View Full Version : QTextEdit and URL clicked signal

24th June 2012, 17:20
I need make signal in QTextEdit when URL will by clicked and this sgnal mass have URL as parameter ( for example SIGNAL(urlClick(QString f_URL)))
Can do that ??

24th June 2012, 17:59
Combine mouse events with QTextEdit::anchorAt() or use QTextBrowser which has a QTextBrowser::anchorClicked() signal.

24th June 2012, 19:09
It mass be on QTextEdit.
With mouse event and QTextEdit::anchorAt() will be very difficul because in my aplication will be can add and remove URL ;(
There is no other way ?

24th June 2012, 19:23
I don't know what other way than handling mouse events you would like to have.

24th June 2012, 20:01
Maybey other way.
My app is a notepad, the URL will by path to file and i want do somthing like that, if URL will bee clicked then app open this file in window.

24th June 2012, 20:40
I still don't understand what does it have to do with my solution.

24th June 2012, 21:06
Srry, Its work ;) Thx for help