Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Need help: how to style the top and bottom edges of a combobox menu
Forum Updated to NodeBB v4.3 + New Features

Need help: how to style the top and bottom edges of a combobox menu

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pciccone
    wrote on last edited by
    #1

    Hello.
    Apologizes if this is explained somewhere, I searched everywhere and I could not come up with an answer.
    I have a stylesheet used to customize my application that customizes the comboboxes. The problem that I have is that there are two white bands at the top and bottom of the popup menu used for the combobox, no matter what I try to do to remove them or, even better, make them look like the rest of the menu.
    Here is my stylesheet:

    @QComboBox {
    border: 1px solid black;
    background-color: #606060;
    border-radius: 3px;
    min-width: 6em;
    selection-background-color: #ffa828;
    selection-color: black;
    }

    QComboBox::drop-down {
    subcontrol-origin: padding;
    subcontrol-position: top right;

     border-left-width: 1px;
     border-left-color: darkgray;
     border-left-style: solid;
    

    }

    QComboBox QAbstractItemView {
    padding-top: 0px;
    padding-bottom: 0px;
    background-color: #686868;
    }
    @

    And here is an example of how it shows:
    !https://dl.dropbox.com/u/3701566/images/ScreenShot_136.png(screenshot)!

    I want to make those two white bands assume the background color of the rest of the menu. Alternatively it woul dbe great to simply remove them.

    Thank you very much for any help that you can provide.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      pciccone
      wrote on last edited by
      #2

      Hello. I'm just trying to refresh this thread to see if anybody has a solution. Any takers? Is this an unsolvable bug of Qt 4.8?
      Thanks in advance.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alexieljiang
        wrote on last edited by
        #3

        I have the same problem. It seems there is a default background behind QComboBox menu and it cannot be edited.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved