QmlDesigner: Fix for RichTextEditor Qt Version

Original task: QDS-2634

Change-Id: I7edc580aec36090e037c4520ad364a62427df9f0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Aleksei German
2020-08-27 16:42:22 +02:00
parent 3fd9110233
commit 61b21b0a2f

View File

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