Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
4.7.4
-
None
-
Windows
Description
When a QTextTable is created to a QTextDocument and the background color is set with QTextCharFormat, an ODF file is created and the background color is used as the highlight color for the text. The background color for the table is not set. If an html file is created the background color is set for the table cell. The following example will show the issue:
int main(int argc, char *argv[]) { QApplication app(argc, argv); QTextDocument doc; QTextTableFormat formatTable; QTextCursor cursor(&doc); formatTable.setCellPadding(10.0); QTextTable * pTable = cursor.insertTable(1,1,formatTable); QTextTableCell cell = pTable->cellAt(0,0); QTextCharFormat format = cell.format(); format.setBackground(Qt::blue); cell.setFormat(format); cursor.insertText("hello"); QTextDocumentWriter("test.odt","odf").write(&doc); QTextDocumentWriter("test.html","html").write(&doc); return 0; }
Attachments
Issue Links
- is replaced by
-
QTBUG-7047 Background brush is not taken into account when writing to ODF
- Closed
- relates to
-
QTBUG-36152 Add support for styling the different borders in a table in CSS
- Closed