Nov-02-2022, 07:02 PM
I noticed that if I set the background color of a
just sets the background color and the text color, the caret is invisible/transparent. I haven't tested yet, but I'm pretty sure I can work around this with
Any ideas how to set caret and text color via a style sheet?
QLineEdit
, the caret (text cursor) becomes invisible. Setting the foreground color does nothing for the caret. So, this:setStyleSheet("QLineEdit{background-color: Gray; color: Black}")
just sets the background color and the text color, the caret is invisible/transparent. I haven't tested yet, but I'm pretty sure I can work around this with
setTextColor()
, so it's not the end of the world, I'd just like to do it via a style sheet. I am on PyQt6 v6.4.0.Any ideas how to set caret and text color via a style sheet?