Results 1 to 4 of 4

Thread: QTabWidget tab height

  1. #1
    Join Date
    Jan 2006
    Posts
    39
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default QTabWidget tab height

    Hi,

    I'm trying to alter the height of the tabs in my QTabWidget. I've tried to set a corner widget with the desired height, use an icon to stretch it taller, set the height on the tabBar itself, setting a global strut on the entire application (which has some effect, but not nearly the desired one), and probably a few other things I can't think of right now. None of it has any effect. Does anyone know if this is possible, and if so, how to do it?

    Thanks,
    Derek

  2. #2
    Join Date
    Jan 2006
    Location
    Paris, France
    Posts
    227
    Thanks
    3
    Thanked 21 Times in 21 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTabWidget tab height

    I didn't really try, but maybe this property of QStyle could help you : that implies to subclass QStyle of course, which is really easy ;-)

    This a pixel metric property :

    QStyle::PM_TabBarTabVSpace -> Extra space added to the tab height.

  3. #3
    Join Date
    Jan 2006
    Posts
    39
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QTabWidget tab height

    Thanks, but that had no effect either. And I poked around and found the following the code for the QTabBar class:

    Qt Code:
    1. // Since tab widget is rather *ahem* strict about keeping the geometry of the
    2. // tabbar to its absolute minimum...
    To copy to clipboard, switch view to plain text mode 

    So basically, I think I'm writing my own (which I might have had to do anyway since crazy graphic designers want non-standard shapes for the tabs).

    Derek

  4. #4
    Join Date
    May 2007
    Posts
    16
    Thanked 1 Time in 1 Post

    Default Re: QTabWidget tab height

    How did you solved this problem. I am also had same problem. I want to increase the height of QTabBar

    Thanks
    C

Similar Threads

  1. Set height of QTableView to fit exact number of rows.
    By Ben.Hines in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2019, 01:49
  2. QTextEdit preferred height
    By darksaga in forum Qt Programming
    Replies: 1
    Last Post: 23rd May 2007, 02:03
  3. How can I get the Systray height ?
    By Nyphel in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2007, 09:04
  4. QTextEdit height using Qt3.3.5
    By vermarajeev in forum Qt Programming
    Replies: 3
    Last Post: 15th December 2006, 08:43
  5. height()
    By mickey in forum Newbie
    Replies: 1
    Last Post: 22nd March 2006, 20:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.