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. Remove dotted border around combo box items
Forum Updated to NodeBB v4.3 + New Features

Remove dotted border around combo box items

Scheduled Pinned Locked Moved General and Desktop
16 Posts 7 Posters 18.5k 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.
  • G Offline
    G Offline
    gauravofindia
    wrote on last edited by
    #5

    If you see i want to remove the boder which comes on mouse over on the Hit State text.

    1 Reply Last reply
    0
    • N Offline
      N Offline
      ngrosjean
      wrote on last edited by
      #6

      so perhaps you could use :

      @QComboBox::selected:item { border: 0px solid black }@

      or

      @QAbstractScrollArea::selected:item { border: 0px solid black }@

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gauravofindia
        wrote on last edited by
        #7

        how do apply the above style on QComboBox QAbstractItemView?

        1 Reply Last reply
        0
        • N Offline
          N Offline
          ngrosjean
          wrote on last edited by
          #8

          For a first try, create a file named "my_style.qss", put the previous line inside, then simply launch your application with:

          @myApplication -stylesheet my_style.qss@

          NB : QAbstractItemView is an QAbstractScrollArea.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            gauravofindia
            wrote on last edited by
            #9

            Is there a way i can apply the style directly in style file?

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on last edited by
              #10

              you can do that via q QStyle implementation, but I think, the focus rectangle (which is in fact the problem here) can't be modified via style sheet.

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gauravofindia
                wrote on last edited by
                #11

                Is there some way through or something else so i can the border invisible or hide it so it does not show?

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  giesbert
                  wrote on last edited by
                  #12

                  AFAIK not ...

                  Nokia Certified Qt Specialist.
                  Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    arybnikov
                    wrote on last edited by
                    #13

                    Maybe topicstarter already has resolved this problem, but I found solution:

                    QComboBox QAbstractItemView {
                    outline: 0px;
                    }

                    this stylesheet deletes dotted border.
                    Maybe it helps someone.

                    1 Reply Last reply
                    6
                    • S Offline
                      S Offline
                      sahara108
                      wrote on last edited by
                      #14

                      i overwrite QApplication and use your code:
                      @this->setStyleSheet("QComboBox QAbstractItemView { outline: 0px;}");@
                      but the outline still there. Plz help

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        redschmidt
                        wrote on last edited by
                        #15

                        It worked for me, thank you very much arybnikov.

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          RukshanA
                          wrote on last edited by
                          #16

                          Thank you "arybnikov" this worked for me as well :)

                          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