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. How to set QTabBar 's tab to the max width?
Forum Updated to NodeBB v4.3 + New Features

How to set QTabBar 's tab to the max width?

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

    I reimplement the QTabBar and setExpanding(ture);

    and I use qss to set the tabs width:
    @
    CTabBar::tab {
    min-width:60px;
    max-width:170px;
    }
    @

    When the tabbar has a lot of free space and the tab's title has few word, the tab will have mininum width.

    How the let the tab have the max-width when the title has few word?
    By the way , I have to set the min-width because when has many tabs, it can zoom out.

    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