Hi all,
after calling QTextCharFormat to set specific words' font size,
i cannot update the whole text's font anymore.
For example:
I have an idea.
"an idea" is changed by the function below:
Qt Code:
void testTextView :: setInsertTextFont(const QFont& font) { QTextCharFormat fmt; fmt.setFont(font); cursor.mergeCharFormat(fmt); m_edit -> mergeCurrentCharFormat(fmt); }To copy to clipboard, switch view to plain text mode
then when I called QTextEdit::setFont() and zoomIn()/zoomOut(), only "I have" change to the size I wanted,
but "an idea" remains the same state as before.
any idea to fix the problem?
Bookmarks