Results 1 to 6 of 6

Thread: hide tabbar

  1. #1
    Join Date
    May 2009
    Location
    Gorontalo
    Posts
    200
    Thanks
    20
    Thanked 5 Times in 5 Posts
    Qt products
    Platforms
    Unix/X11 Windows

    Question hide tabbar

    How to hide tabbar in tabwidget if only have one tab?

  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: hide tabbar

    Did you try tabBar()->hide()?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Aug 2013
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: hide tabbar

    Im trying to use

    ui->tabWidget->tabBar()->hide();

    and gives that error:

    error: C2248: 'QTabWidget::tabBar' : cannot access protected member declared in class 'QTabWidget'

    What is the wrong thing here?

  4. #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: hide tabbar

    tabBar() is a protected method, you cannot call it from outside QTabWidget class.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Aug 2013
    Posts
    2
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: hide tabbar

    So is there any way to change visibility of tab bar completely?

  6. #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: hide tabbar

    Quote Originally Posted by tolgatuna_09 View Post
    So is there any way to change visibility of tab bar completely?
    Sure there is. Subclass QTabWidget and provide a public method that will call tabBar()->hide().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. StyleSheet for TabBar
    By sdastagirmca in forum Qt Programming
    Replies: 11
    Last Post: 15th May 2012, 16:45
  2. Problem with TabBar und StyleSheet
    By QtNoob in forum Qt Programming
    Replies: 0
    Last Post: 23rd July 2009, 00:06
  3. show Tabbar only if there are more than 1 tabs.
    By momesana in forum Qt Programming
    Replies: 2
    Last Post: 23rd September 2007, 20:07
  4. Center TabBar horizontally on the TabWidget
    By forrestfsu in forum Qt Programming
    Replies: 8
    Last Post: 14th March 2007, 14:26
  5. how to put the tabbar at the left in a tabwidget
    By qtopiahooo in forum Qt Programming
    Replies: 1
    Last Post: 14th December 2006, 06: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.