Results 1 to 10 of 10

Thread: hide tab within a tabified dock widget

  1. #1
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default hide tab within a tabified dock widget

    hi

    there is a strange problem.
    dock->tab_5->hide();
    dose not work.
    there is 5 tabs in the proposed dock

    regards
    navid

  2. #2
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    it is Qt4.6.3 on WinXP-SP3

  3. #3
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    hey
    anybody ?

  4. #4
    Join Date
    Apr 2010
    Posts
    34
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    Can you please specify the classes you are using? Can you add some code examples?

  5. #5
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    #include "buildingwidgets.h"

    Qt Code:
    1. class BuildingWidgets : public QDockWidget
    2. {
    3. Q_OBJECT
    4. public:
    5. BuildingWidgets(QWidget * pqwparent=0);
    6. ~BuildingWidgets();
    7. }
    To copy to clipboard, switch view to plain text mode 


    Qt Code:
    1. BuildingWidgets::BuildingWidgets(QWidget * pqwparent):
    2. QDockWidget(pqwparent), dock(new Ui::BuildingWidgets)
    3. {
    4. dock->setupUi(this);
    5. dock->tab_admin->hide();
    6. }
    To copy to clipboard, switch view to plain text mode 

  6. #6
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    I didn't send the details
    there is all of the "include, signals, slots,..."


    but only two commands of dock->tab_admin->hide(); or dock->tab_admin->setVisible(false); do not work!!

  7. #7
    Join Date
    Apr 2010
    Posts
    34
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    Well, you're a bit mean with the posts, aren't you?
    What exactly does the code do wrong? From what I see I can't figure out what's wrong. Does the widget "tab_admin" hide? Probably yes, but the dock widget not, is that true? Provide more information, please. What's in ui_buildingWidgets.h?

  8. #8
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    I said that it is strange
    I want to hide Tab tab_admin (between several available tabs), but it is visible!!

  9. #9
    Join Date
    Oct 2009
    Posts
    90
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    find enclosed 'ui_buildingWidgets.h'
    Attached Files Attached Files

  10. #10
    Join Date
    Jun 2010
    Location
    India
    Posts
    50
    Thanks
    1
    Thanked 15 Times in 14 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: hide tab within a tabified dock widget

    try removing your tabified dock widget using..

    QMainWindow::removeDockWidget ( QDockWidget * dockwidget ) & you may restore using QMainWindow::restoreDockWidget ( QDockWidget * dockwidget )

Similar Threads

  1. MAC: Getting Dock widget show/hide events
    By jay in forum Qt Programming
    Replies: 3
    Last Post: 31st May 2010, 08:07
  2. Tabbed Dock Widget
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 26th May 2010, 04:38
  3. sliding dock widget
    By manishkyl in forum Qt Programming
    Replies: 0
    Last Post: 28th July 2008, 14:04
  4. hideEvent not propagated to tabified dock widgets
    By spud in forum Qt Programming
    Replies: 2
    Last Post: 4th October 2007, 09:00
  5. Pin/Unpin Dock Widget
    By charlesD in forum Newbie
    Replies: 1
    Last Post: 21st June 2006, 06:57

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.