QTextedit set anchor and scroll to it

Viewed 2284

How can I set an anchor in QTextEdit?

There seems to be a method to scroll to an anchor, but not any method to set actually one.

So I tried this, but it does not work.

mTextEdit->setHtml("some html stuff");
mTextEdit->append("<a href=\"#word\">word</a>");
mTextEdit->scrollToAnchor("word");

Any suggestions?

1 Answers
Related