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. Problem in making Fixed size QtabWidget's tab
Forum Updated to NodeBB v4.3 + New Features

Problem in making Fixed size QtabWidget's tab

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

    Hi All,
    I will be creating many tabs with with different tab text at runtime..
    but the tab bar size is keep-on getting increased depending upon the Tab Text , which i provided at runtime..
    So i used the following function to make it fixed width.
    @
    ui->tabWidget->setStyleSheet("QTabBar::tab{height:20px; width:160px; font: 8pt;alignment: left;}");
    @

    now i am able to see my QTabWidget Tab size is fixed..but the Tab text alignment is center by default( i assume )..
    but i want to show my tab text as left alignment..

    eg: Input text "test sample of tab Text"

    My ouput is " sample of tab Te"

    but i want ...my ouput should be "test sample of ta..."

    Please let me know...whether i am doing anything wrong in my operation on achiving fixed tab size??

    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