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. Increase margins automatically for text inside tab pane title...
Qt 6.11 is out! See what's new in the release blog

Increase margins automatically for text inside tab pane title...

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.0k 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.
  • T Offline
    T Offline
    tmason101
    wrote on last edited by
    #1

    Hello,

    See the image below, the tab margins doesn't seem to be expanding properly for my tab title within a QTabWidget;

    !http://s10.postimg.org/uzujr3k3d/Text_Margins_Too_Small.png(Text Margin Too Small)!

    How can I increase the margins automatically so that all of the text can be seen?

    Here is my stylesheet code as well:

    @
    QTabWidget::pane {border: 0px; top:-5px;}
    QTabWidget::tab-bar {top:5px;left: 10px;}
    QTabBar::tab {background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #E1E1E1, stop: 0.4 #DDDDDD,stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3);border: 2px solid #C4C4C3;border-bottom-color: #293723;border-top-left-radius: 4px;border-top-right-radius: 4px;min-width: 8ex;padding:10px;font-size:14px}
    QTabBar::tab:selected, QTabBar::tab:hover {background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #fafafa, stop: 0.4 #f4f4f4,stop: 0.5 #e7e7e7, stop: 1.0 #fafafa);}
    QTabBar::tab:selected {border-color: #9B9B9B;border-bottom: 0px;margin-left: -6px;margin-right: -6px;}
    QTabBar::tab:!selected {margin-top: 2px; border-bottom: 0px;}
    QTabBar::tab:first:selected {margin-left: 0px;}
    QTabBar::tab:last:selected {margin-right: 0px;}
    QTabBar::tab:only-one {margin: 0px;}
    @

    Thank you for your time.

    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