QT6: QComboBox focus style
-
I am trying to set the style of a QComboBox when it is in focus (tabbed to).
The general QComboBox style is a black background with white text.When I try the following styles, when the QComboBox is in focus its background does change to white, but the text stays white.
QComboBox {
background-color: black;
color: white;
}
QComboBox:focus {
background-color: white;
color: black;
}I have also tried:
QComboBox:selected {
background-color: white;
color: black;
}
This seems to work like the :focus.- How do I set the text color when in focus ?
- Is there a definitive guide to all Qt style options (There appear only to be a few examples) ?
-
I am trying to set the style of a QComboBox when it is in focus (tabbed to).
The general QComboBox style is a black background with white text.When I try the following styles, when the QComboBox is in focus its background does change to white, but the text stays white.
QComboBox {
background-color: black;
color: white;
}
QComboBox:focus {
background-color: white;
color: black;
}I have also tried:
QComboBox:selected {
background-color: white;
color: black;
}
This seems to work like the :focus.- How do I set the text color when in focus ?
- Is there a definitive guide to all Qt style options (There appear only to be a few examples) ?