void writeToEditor
( QString partOfText,
double readBytes
) {
for( int i = 0; i < readBytes; i = i + 10 )
{
QStringRef subString( &partOfText, i, 10 );
newFormat.append( subString );
newFormat.append( " " );
}
objQPlainTextEdit.appendPlainText( newFormat );
}
void writeToEditor( QString partOfText, double readBytes )
{
QString newFormat;
for( int i = 0; i < readBytes; i = i + 10 )
{
QStringRef subString( &partOfText, i, 10 );
newFormat.append( subString );
newFormat.append( " " );
}
objQPlainTextEdit.appendPlainText( newFormat );
}
To copy to clipboard, switch view to plain text mode
Here objQPlainTextEdit is an object of QPlainTextEdit.
Considering: https://doc.qt.io/qt-5/qplaintextedit.html
Each character within a paragraph has its own attributes, for example, font and color.
I can see there is QPalette. How to use it to color the alphabets displayed in QPlainTextEdit, differently?
For example: 'A' should be of red color, and 'B' should be of green colour.
Bookmarks