diff --git a/src/Gui/DlgEditor.ui b/src/Gui/DlgEditor.ui
index 60906589bd..ec7fa0f33d 100644
--- a/src/Gui/DlgEditor.ui
+++ b/src/Gui/DlgEditor.ui
@@ -71,9 +71,6 @@
-
-
- 40
-
-
diff --git a/src/Gui/DlgEditorImp.cpp b/src/Gui/DlgEditorImp.cpp
index 13ad497219..134985e792 100644
--- a/src/Gui/DlgEditorImp.cpp
+++ b/src/Gui/DlgEditorImp.cpp
@@ -61,6 +61,12 @@ DlgSettingsEditorImp::DlgSettingsEditorImp( QWidget* parent )
ui->setupUi(this);
ui->EnableFolding->hide(); // Switch off until we have an editor with folding
+#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
+ ui->textEdit1->setTabStopWidth(40);
+#else
+ ui->textEdit1->setTabStopDistance(40.0);
+#endif
+
d = new DlgSettingsEditorP();
QColor col;
col = Qt::black;