diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp index 194e1e3d92..3a1b3321a1 100644 --- a/examples/widgets/richtext/textedit/textedit.cpp +++ b/examples/widgets/richtext/textedit/textedit.cpp @@ -620,7 +620,7 @@ void TextEdit::textItalic() void TextEdit::textFamily(const QString &f) { QTextCharFormat fmt; - fmt.setFontFamily(f); + fmt.setFontFamilies({f}); mergeFormatOnWordOrSelection(fmt); }