One , Adjust cursor position
// Get document object QTextDocument* document = this->paramBar->document(); QTextCursor
cursor; // Must be set, otherwise no cursor appears this->paramBar->setFocus(); // query FIELD Location of , Do not ignore case cursor
= document->find("FIELD",QTextDocument::FindCaseSensitively); // Get offset int pos
= cursor.position(); // Gets the current cursor object QTextCursor cs =this->paramBar->textCursor();
// start cs.movePosition(QTextCursor::Start); // Offset position
cs.movePosition(QTextCursor::NextCharacter,QTextCursor::MoveAnchor,pos); //
Set new cursor object this->paramBar->setTextCursor(cs);
Two , Set font
QFont qf; // Bold or not qf.setBold(true); // size qf.setPointSize(13); // Font name
qf.setFamily(" Chinese imitating Song Dynasty "); // Character spacing qf.setLetterSpacing(QFont::AbsoluteSpacing,12);
Three , Set color
// colour QPalette p = this->paramBar->palette(); //
adopt QPalette::Text Enumerates objects whose settings are changed ,TEXT For text ,BASE Is the background color p.setColor(QPalette::Active,
QPalette::Text, Qt::red); this->paramBar->setPalette(p);

©2019-2020 Toolsou All rights reserved,
( Essence 2020 year 6 month 3 Daily update ) TypeScript Detailed explanation of Chinese interface org.postgresql.util.PSQLException Processing records git Pull the remote branch and switch to it ( Essence )2020 year 8 month 15 day redis database StackExchange.Redis in Set type (C# edition )Centos7 lower mysql8.0 To install and change the initial password ;11-5 Output string at specified position vue obtain el-select Of the selected item label value Conflict statement (conflicting declaration) solve PHP Printout log mysql No backup recovery