Dear JPN!
Thanks for your reply!
However It is working well for Qt::TexturePattern, Qt:
enseXPattern (here X means 1,2,3 ....7);
But I am not getting the horizontal pattern as I have attached the previous file.
So, What I change in my code;
QBrush brush
(Qt
::blue,Qt
::HorPattern);
format.setForeground(brush);
if (!cursor.hasSelection())
cursor.mergeCharFormat(format);
txtScrollEdit->setFontPointSize(28);
txtScrollEdit
->setFontWeight
(QFont::Bold);
txtScrollEdit->mergeCurrentCharFormat(format);
QTextCharFormat format;
QBrush brush(Qt::blue,Qt::HorPattern);
format.setForeground(brush);
QTextCursor cursor = txtScrollEdit->textCursor();
if (!cursor.hasSelection())
cursor.select(QTextCursor::Document);
cursor.mergeCharFormat(format);
txtScrollEdit->setFontPointSize(28);
txtScrollEdit->setFontWeight(QFont::Bold);
txtScrollEdit->mergeCurrentCharFormat(format);
To copy to clipboard, switch view to plain text mode
to get the desired output.
I am getting the output as attached in the sample.png. So, How a way I get output as I have attached earlier.
Bookmarks