Hello! I'm trying to underline some text with a waved line. Here is my code:

f = cr.blockCharFormat ();
f.setUnderlineStyle (QTextCharFormat::WaveUnderline);
f.setUnderlineColor (Qt::red);
f.setFontUnderline (true);
cr.mergeCharFormat (f);
[...]
textEdit->setTextCursor (cr);
Underlining work well, but I see just a plain, non-waved line (QTextCharFormat::SingleUnderline). The same thing happens with QTextCharFormat::SpellCheckUnderline and other underlingg styles - just the QTextCharFormat::SingleUnderline works in all cases.