Qt5: 'void Q[Plain]TextEdit::setTabStopWidth(int)' is deprecated [-Wdeprecated-declarations]

This commit is contained in:
wmayer
2020-06-11 22:37:39 +02:00
committed by wwmayer
parent 98b1116424
commit aefd5e2358
4 changed files with 16 additions and 0 deletions

View File

@@ -655,7 +655,11 @@ void ReportOutput::OnChange(Base::Subject<const char*> &rCaller, const char * sR
setFont(font);
QFontMetrics metric(font);
int width = QtTools::horizontalAdvance(metric, QLatin1String("0000"));
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
setTabStopWidth(width);
#else
setTabStopDistance(width);
#endif
}
else if (strcmp(sReason, "RedirectPythonOutput") == 0) {
bool checked = rclGrp.GetBool(sReason, true);