I have the following question.
My QTableView
has background color set to black
and color (of contents) to white
. So, white text appears on a black background - everything seems to be correct. However, when editing (typing in editing mode) content color is changed to black and it becomes completely invisible due to black background, but editing works fine. After confirming - color reverts back to white. How to set color of currently-being-edited text to white (preferably via stylesheets) or stop such change in this case?
You have to use the :edit-focus
and/or :focus
states in your stylesheet.
QTableView:edit-focus {
// style here
}
For a list of all available states have a look here