Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Visual bug in QScrollbar

Visual bug in QScrollbar

Scheduled Pinned Locked Moved Solved Qt for Python
2 Posts 1 Posters 322 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.
  • insideeeI Offline
    insideeeI Offline
    insideee
    wrote on last edited by
    #1

    Im having this visual bug on Windows 10 but on linux the transparency works fine.

    alt text

    Stylesheet im using:

    self._results_scroll.setStyleSheet("""QScrollBar:vertical {
                                                background-color: rgba(0, 0, 0, 0);
                                                width:8px;    
                                                margin: 0px 0px 0px 0px;
                                                }
                                                QScrollBar::handle:vertical {
                                                background: #161C26;
                                                border-radius: 4px;
                                                min-height: 0px;
                                                }
                                                QScrollBar::add-line:vertical {
                                                background: none;
                                                height: 0px;
                                                subcontrol-position: bottom;
                                                subcontrol-origin: margin;
                                                }
                                                QScrollBar::sub-line:vertical {
                                                background: none;
                                                height: 0 px;
                                                subcontrol-position: top;
                                                subcontrol-origin: margin;
                                                }""")
    

    Has anyone gone through something similar or had any thoughts on it?

    1 Reply Last reply
    0
    • insideeeI Offline
      insideeeI Offline
      insideee
      wrote on last edited by
      #2

      Solved by adding:

      QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 
      QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
      border: none;
      background: none;
      color: none;
      }
      

      Full working code:

      QScrollBar:vertical {
      background-color: rgba(0, 0, 0, 0);
      width:8px; 
      }
      QScrollBar::handle:vertical {
      background: #161C26;
      border-radius: 4px;
      min-height: 20px;
      }
      QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
      border: none;
      background: none;
      }
      QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical, 
      QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
      border: none;
      background: none;
      color: none;
      }                     
      

      source: obs github

      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