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 border in pseudo states
Forum Updated to NodeBB v4.3 + New Features

Remove border in pseudo states

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 227 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.
  • C Offline
    C Offline
    ChiTor
    wrote on last edited by
    #1

    Hi, y'all!

    I have a QTreeView component which I do not require any borders on the QTreeView its items. The problem is the border still occurs when I press the item or is already being selected. None of the underneath code lines works and still show some kind of border with slight opacity of its background color.

    QTreeView {
        border: none;
    }
    
    QTreeView::item::pressed {
        border: 0px solid transparent;
    }
    
    QTreeView::item::selected{
        border: 0px solid transparent;
    }
    

    This kind of behavior with the border seems to be done by default because it seems QPushbutton including an image behaves the same way. Any ideas on how to remove or disable the border in QTreeView its pseudo-states somehow?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChiTor
      wrote on last edited by
      #2

      This is the trick to remove the border during the activated state.

      QTreeView::item{
          padding: -1px;
      }
      
      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