hi All,
I am trying to have desired background color in Rows of QtextTable .I used following code But i am not able to get Result.What is wrong with code.
editor->setGeometry(0,0,200,200);
QBrush brush
(color,Qt
::RadialGradientPattern);
format.setBackground(brush);
QTextTable *table
= cursor.
insertTable(1,
1, format
);
cursor.insertText("Helo");
QTextEdit *editor=new QTextEdit(this);
editor->setGeometry(0,0,200,200);
QTextCursor cursor(editor->textCursor());
cursor.movePosition(QTextCursor::Start);
QColor color(222,22,0,255);
QBrush brush(color,Qt::RadialGradientPattern);
QTextTableFormat format;
format.setBorderStyle(QTextFrameFormat::BorderStyle_Dashed);
format.setBackground(brush);
QTextTable *table = cursor.insertTable(1, 1, format);
cursor.insertText("Helo");
To copy to clipboard, switch view to plain text mode
Bookmarks