Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.8.0
-
None
-
Arch Linux / Antergos, both Gnome and KDE desktops.
Description
As of Qt version 5.8, setting the cursor color (i.e., the caret color) can no longer be done via QPalette or setting the "color" property in QPlainTextEdit's style sheet. I appears the cursor color is automatically determined based on the background color of QPlainTextEdit. However, the color it determines is not always ideal.
Furthermore, using the background color to determine the cursor color causes issues with attaching a QGraphicsEffect to QPlainTextEdit's viewport() widget. When using a custom QGraphicsEffect, calling sourcePixmap() causes QPlainTextEdit to draw an invisible cursor to the pixmap whenever the "background-color" property for the QPlainTextEdit widget is set it's style sheet. I believe this is because QPlainTextEdit cannot yet determine what the background color is at this stage (for whatever reason), and thus it cannot determine a complimentary color for the cursor color.
Please revert to allowing the programmer to choose the cursor color via the "color" property for the QPlainTextEdit style sheet.
Note: I have not tested QTextEdit yet, but I would not be surprised if it had the same issue.
Attachments
Issue Links
- relates to
-
QTBUG-98938 All gui control used QTextLayout::drawCursor can not set cursor color
- Reported