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. QToolBox seamless tab title and content
Forum Updated to NodeBB v4.3 + New Features

QToolBox seamless tab title and content

Scheduled Pinned Locked Moved Unsolved Qt for Python
1 Posts 1 Posters 179 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.
  • K Offline
    K Offline
    ktechhydle
    wrote on last edited by
    #1

    Hey all. I am trying to style my QToolBox similar to one like Blenders:

    Screenshot 2024-10-09 100453.png

    Notice how the tab title and widget are seamlessly connected? Well I tried this with QSS stylesheets, and heres the result

    Screenshot 2024-10-09 100617.png

    As you can see, I pretty much have it dialed, except for the internal QWidget. I am getting a natural gap between tab title and widget, how can I remove it? Is it stylesheet related, or is it code? Any help is appreciated, and heres my stylesheet:

    QToolBox
    {
        background-color: #303030;
        padding: 10px 10px 10px 10px;
    }
    
    QToolBox::tab {
        background-color: #3d3d3d;
        border: 1px solid #3d3d3d;
        border-radius: 5px;
        font-weight: bold;
        color: #c2c2c2;
        image: url('mp_software_stylesheets/assets/triangle-right.svg');
        image-position: left;
    }
    
    QToolBox::tab:hover
    {
        background-color: #606060;
        color: white;
    }
    
    QToolBox::tab:selected
    {
        image: url('mp_software_stylesheets/assets/triangle-down.svg');
        border-bottom-left-radius: 0px;
        border-bottom-right-radius: 0px;
    }
    
    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