have a look on file:Originally Posted by rajesh
http://ciz.ch/svnciz/_STATIC_LIBS_QT...it/html_edit.h
http://ciz.ch/svnciz/_STATIC_LIBS_QT.../html_edit.cpp
this sample make a href link or unlink a text
Qt Code:
void HTML_Edit::makehrefLink() { bool is_selected = html_area->textCursor().hasSelection(); if (vol_18->isChecked()) { QString ltext; if (sthtml.size() < 1) { sthtml= "Text to link"; } Href_Gui::self( this )->text_href->setText(sthtml); Href_Gui::self( this )->exec(); if (Href_Gui::self) { if (data.count() > 0) { /*qDebug() << "### linerr rrr " << QString(data.at(0)); qDebug() << "### linerr rrr " << QString(data.at(1)); qDebug() << "### linerr rrr " << QString(data.at(2));*/ html_area->textCursor().insertFragment(fragment); vol_18->setChecked(false); } } } else { html_area->textCursor().insertFragment(fragment); } }To copy to clipboard, switch view to plain text mode
Bookmarks