From 61b21b0a2fa91d8146c1b68a267608159727e2b6 Mon Sep 17 00:00:00 2001 From: Aleksei German Date: Thu, 27 Aug 2020 16:42:22 +0200 Subject: [PATCH] QmlDesigner: Fix for RichTextEditor Qt Version Original task: QDS-2634 Change-Id: I7edc580aec36090e037c4520ad364a62427df9f0 Reviewed-by: Christian Stenger --- .../qmldesigner/components/richtexteditor/richtexteditor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: