![]() Lambda state: text_tTextColor(btn_color. "Background", text_edit.palette().color(QPalette.Base)) "Text Color", text_edit.palette().color(QPalette.Text)) Text_tCursorWidth(QFontMetrics(text_edit.font()).averageCharWidth()) Win.setWindowTitle("Test Set Cursor Color") (see screenshot below) 3 Select a color you want. 2 Click/tap on Text cursor on the left side, and click/tap on Pick a custom text cursor indicator color under the Use text cursor indicator section on the right side. TextEdit::TextEdit(QWidget *parent) : QTextEdit(parent) ".format(QT_VERSION_STR)) 1 Open Settings, and click/tap on the Ease of Access icon. Virtual void paintEvent(QPaintEvent *pEvent) override I noticed that the cursor created with his solution didn't blink, though, so I wanted to share a blinking version derived from Scheff's code with my (inexperienced) addition.Įxplicit TextEdit(QWidget *parent = nullptr) I encourage a full read of Scheff's answer. TextEntry->setStyleSheet("color: rgb(255, 0, 0) " TextEntry->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff) TextEntry->setLineWrapMode(QTextEdit::NoWrap) ![]() TextEntry->setFont(QFont("Electrolize", 9, 1)) Despite my best efforts, it continues to blink white.įrom what I've found, the Style Sheet "color" property is supposed to change the color of the cursor. ![]() ![]() I am trying to make the text cursor on a QTextEdit red (rgb(255,0,0)). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |