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. How fix the QPalette QSTYLE problem?
Qt 6.11 is out! See what's new in the release blog

How fix the QPalette QSTYLE problem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 1 Posters 420 Views
  • 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.
  • nicker playerN Offline
    nicker playerN Offline
    nicker player
    wrote on last edited by nicker player
    #1

    I put the code below into the project.

    QPalette{background:#D4D4D4;}*{outline:0px;}
    

    That when i used the qcombox ,the selection background becamed the dark color.Whatever I inputting the qstyle of the qcombox,it seemed unuseful.

    And I dont know why.

    1 Reply Last reply
    0
    • nicker playerN Offline
      nicker playerN Offline
      nicker player
      wrote on last edited by
      #2

      only one of the object came the style likes this.Others were normal.
      Please help me.
      1c469648-6f56-49a9-b270-142ae2ea6424-image.png

      nicker playerN 1 Reply Last reply
      0
      • nicker playerN nicker player

        only one of the object came the style likes this.Others were normal.
        Please help me.
        1c469648-6f56-49a9-b270-142ae2ea6424-image.png

        nicker playerN Offline
        nicker playerN Offline
        nicker player
        wrote on last edited by
        #3

        Was that a bug ?
        Only if i use the qformlayout add the row of the qcombox,the qocombox selection part became the dark color.
        If i used the qvboxlayout something else,the qcombox became normally.

        nicker playerN 1 Reply Last reply
        0
        • nicker playerN nicker player

          Was that a bug ?
          Only if i use the qformlayout add the row of the qcombox,the qocombox selection part became the dark color.
          If i used the qvboxlayout something else,the qcombox became normally.

          nicker playerN Offline
          nicker playerN Offline
          nicker player
          wrote on last edited by nicker player
          #4

          @nicker-player
          I know why the background is dark color.
          Cause I used the
          {background:transparent;}
          qstyle code.How to prevent the parent widget influenced the child qcombobox by using the code "background:transparent;"
          By using the code QComboBox{background-color:white;} seemed unuseful.

          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