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.
Qt Code:
  1. QTextEdit *editor=new QTextEdit(this);
  2. editor->setGeometry(0,0,200,200);
  3. QTextCursor cursor(editor->textCursor());
  4. cursor.movePosition(QTextCursor::Start);
  5. QColor color(222,22,0,255);
  6. QBrush brush(color,Qt::RadialGradientPattern);
  7. format.setBorderStyle(QTextFrameFormat::BorderStyle_Dashed);
  8. format.setBackground(brush);
  9. QTextTable *table = cursor.insertTable(1, 1, format);
  10. cursor.insertText("Helo");
To copy to clipboard, switch view to plain text mode