Results 1 to 7 of 7

Thread: [QTabWidget] horizontal text on left side

  1. #1
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default [QTabWidget] horizontal text on left side

    Hi,

    small simple question: is it possible to have the tabs on the left side of the widget with the text shown horizontally...don't want user to hurt their necks when reading it

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: [QTabWidget] horizontal text on left side

    No, Qt doesn't provide it. You'd have to subclass QTabBar and implement it yourself.

  3. The following user says thank you to wysota for this useful post:

    Boy (16th May 2008)

  4. #3
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QTabWidget] horizontal text on left side

    So QTabBar should support horizontal text on the left side? (don't see the option yet in the Assistant, but still looking)

    if so: I can access the protected member QTabBar and then alter it

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: [QTabWidget] horizontal text on left side

    Quote Originally Posted by Boy View Post
    So QTabBar should support horizontal text on the left side?
    I don't see why not. But you have to implement it yourself.

  6. The following user says thank you to wysota for this useful post:

    Boy (16th May 2008)

  7. #5
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QTabWidget] horizontal text on left side

    what I do as solution is buttons on the left with a frame. Instead of tabs, I created widgets and when pushing a button, the corresponding widget's parent is set to the frame

  8. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: [QTabWidget] horizontal text on left side

    Use a QStackedWidget and a QButtonGroup. Then you'll be able to do everything using signals and slots with practically no additional code.

  9. The following user says thank you to wysota for this useful post:

    Boy (16th May 2008)

  10. #7
    Join Date
    Mar 2008
    Posts
    25
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QTabWidget] horizontal text on left side

    I found that out yesterday! thanks for your help again!

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 10:49

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.