diff --git a/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp b/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp index 91aa1bc0..0ef0daa4 100644 --- a/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp +++ b/libs/qsynedit/qsynedit/exporter/rtfexporter.cpp @@ -145,7 +145,11 @@ QString RTFExporter::getFormatName() QString RTFExporter::getHeader() { QFontMetrics fm(mFont); +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) int tabWidth = mTabSize * fm.horizontalAdvance("M")*72*20/fm.fontDpi(); +#else + int tabWidth = mTabSize * fm.horizontalAdvance("M")*72*20/96; +#endif QString result = QString("{\\rtf1\\ansi\\deff0\\deftab%1").arg(tabWidth) + getFontTable(); // all the colors