Why not?
Qt Code:
To copy to clipboard, switch view to plain text mode
Why not?
Qt Code:
To copy to clipboard, switch view to plain text mode
rleojoseph (7th January 2011)
ya. its working now. But i got a NEW problem now. after inserting the link in the TextEdit, the text which i am typing now is looking like a hyperlink. i have inserted a link lik www.google.com , whatever the text am typing after that it is like Hyperlink. even i tried a lot with Qtextcursor.
Hey what's up with you? Please do not start multiple threads about the same topic, and I told you days ago to use HTML...
And as to your new problem, you probably didn't close the a tag correct. Please show us the code.
Sorry for posting multiple threads
here is the code
Qt Code:
bool ok; if (ok && !baseUrl.isEmpty()) { //int i=cursor.position(); //qDebug("%d",i); cursor.insertHtml(link);To copy to clipboard, switch view to plain text mode
Whatever i am typing after inserting url , all the texts are becoming as hyperlink.
Last edited by Lykurg; 7th January 2011 at 12:46. Reason: missing [code] tags
Make sure the cursor is positioned after the link is closed. For example insert a space after closing the "a" tag. For more advanced things you'll have to use the text document and text cursor api. Bottom line is you need to make sure the current text char format is not the one associated with the link. There are many one that are likely to make it work.
rleojoseph (7th January 2011)
Bookmarks