Unsolved QCombobox css bug??
-
Hi,
i was faced some strange issue..
QCombobox:focus didn't work properly
below is my code
QComboBox:hover
{
font: bold 14px rgb(150, 0, 60);
background-color: rgba(255,255,255,220);
border-style: outset;
border-radius: 3px;
border: 1px solid rgb(150,0,60);
}border is ok but font didn't work..
why is happening?
-
I don't see font colour listed as editable using QSS: docs, perhaps that's the reason.
-
Thank you for reply
Sorry.. i did mistake..
below is perfectly work
QComboBox:hover
{
color: rgb(150,0,60);
font: bold 14px;
background-color: rgba(255,255,255,220);
border-style: outset;
border-radius: 3px;
border: 1px solid rgb(150,0,60);
} -
QCombobox:focus didn't work properly
But you don't do anything about "focus", you do
QComboBox:hover
. I presume you are treating "focus" & "hover" as the same thing?I assume you have verified that without the
:hover
just a plainQComboBox
rule does respect that font?Is it an editable combobox? Is the font change to apply to the items in the selection dropdown, the text in an editable combo, or both?
I have a feeling that this may have been asked recently. And the outcome was that you cannot have a font change on something like hover-only, for whatever reason. Is that good enough, or do you want me to try to dig it the discussion from somewhere?
-
um..
Maybe you can use below to help
QComboBox:hover
{
/something you want/
color: red;
}QComboBox:focus:hover
{
color: white;
}This way, hover and focus can be applied separately.
Is the intention of your question correct?
-
@minjunkim said in QCombobox css bug??:
Maybe you can use below to help
...
Is the intention of your question correct?Sorry, I don't understand. It is not I who needs help, it is you who are asking the question. I was just giving you some hints.