Results 1 to 2 of 2

Thread: stylesheet code for width of a TabBar of a QTabWidget

  1. #1
    Join Date
    Sep 2008
    Posts
    54
    Thanks
    3
    Thanked 10 Times in 5 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    2

    Default stylesheet code for width of a TabBar of a QTabWidget

    Hello,

    Is it possible to change the width of specific tabs of a QTabBar of a QTabWidget?

    I tried this but thats seems not to work:

    m_calibrationTabWidget is the objectName of a QTabWidget

    Qt Code:
    1. QTabBar::tab#m_calibrationTabWidget
    2. {
    3. width: 200px;
    4. background-color: red;
    5. }
    6.  
    7. QTabBar#m_calibrationTabWidget::tab
    8. {
    9. width: 200px;
    10. background-color: red;
    11. }
    To copy to clipboard, switch view to plain text mode 

    Regards,

    Marcel

  2. #2
    Join Date
    May 2011
    Posts
    23
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: stylesheet code for width of a TabBar of a QTabWidget

    Could this work?
    QTabBar:section
    {
    ....

Similar Threads

  1. StyleSheet for TabBar
    By sdastagirmca in forum Qt Programming
    Replies: 11
    Last Post: 15th May 2012, 16:45
  2. QPushButton set width and height from StyleSheet
    By AL in forum Qt Programming
    Replies: 3
    Last Post: 19th March 2010, 14:33
  3. Problem with TabBar und StyleSheet
    By QtNoob in forum Qt Programming
    Replies: 0
    Last Post: 23rd July 2009, 00:06
  4. QTabWidget stylesheet
    By GuS in forum Qt Programming
    Replies: 3
    Last Post: 6th December 2007, 22:31
  5. width and height of QTabWidget
    By chikkireddi in forum Qt Programming
    Replies: 6
    Last Post: 29th October 2007, 13:53

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.