diff --git a/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp b/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp index f0cafc892d3..eda25ec9b8a 100644 --- a/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp +++ b/src/plugins/qmldesigner/components/richtexteditor/richtexteditor.cpp @@ -530,11 +530,14 @@ void RichTextEditor::setupTableActions() cursorEditBlock(cursor, [&] () { //format table cells to look a bit better: QTextTableFormat tableFormat; - tableFormat.setBorderCollapse(true); tableFormat.setCellSpacing(2.0); tableFormat.setCellPadding(2.0); tableFormat.setBorder(1.0); +#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) + tableFormat.setBorderCollapse(true); +#endif + cursor.insertTable(1, 1, tableFormat); //move cursor into the first cell of the table: