0

I would like to have all the comboboxes of my application similar to the PyCharm ones. I was able to change the box itself but not the drop-down list.

Here's what I would like to have:

enter image description here

Here's what I have:

enter image description here

I would like to increase the height of the items, the space between them and to remove the dotted border when the mouse hovers the item. All of this using the stylesheet, since I want all QComboBox to be like this.

Here's my stylesheet:

QComboBox{
    font-family: "Segoe UI";
    font-size: 8pt;
    border-radius: 3px;
    border: 1px solid;
    border-color: rgb(175, 175, 175);
    padding: 3px;
    padding-right: 8px;
    padding-left: 8px;
    background-color: white;
    margin: 1px;
}

QComboBox:focus, QComboBox:on{
    border-radius: 4px;
    border: 3px solid rgb(151, 195, 243);
    margin:0px;
}

QComboBox::drop-down{
    border:none;
}

QComboBox::down-arrow{
    right: 4px;
    image: url(:/custom/custom_icons/down-arrow.png);
}

QComboBox QAbstractItemView{
    border: 1px solid rgb(175, 175, 175);
}

QComboBox QAbstractItemView::item {
    height: 50px;   /*not working*/
}
John Reds
  • 117
  • 14
  • does that help: https://stackoverflow.com/a/25341456/166768 or https://stackoverflow.com/a/52779268/166768 – bzs Mar 18 '21 at 09:02
  • @bzs That's not what I wanted because, as I said, I would like to set it just the first time and not everytime I'm using a QComboBox. But I think I will end up following those suggestions and trying to find the smarter way to apply the changes without getting crazy. – John Reds Mar 18 '21 at 09:12

0 Answers0