Results 1 to 4 of 4

Thread: Hide whole QTableView

  1. #1
    Join Date
    Feb 2015
    Posts
    185
    Thanks
    5
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Question Hide whole QTableView

    On button1 click I display a QTableview say table1.
    On button2 click I display another QTableview say table2.

    When I click button1, table1 is displayed, on click of button2 table2 is displayed. But table1 is still being displayed.

    I want to hide table1 when table2 is displayed, likewise viceversa.

    How do I do this?

    Thanks in Advance

  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 whole QTableView

    You call hide() on the widget you want to hide. Or you use QStackedWidget.
    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
    Feb 2015
    Posts
    185
    Thanks
    5
    Qt products
    Qt5
    Platforms
    MacOS X Windows

    Default Re: Hide whole QTableView

    Got it resolved. Thanks.
    First I had to remove the rows from the model and then hide. only this way I am able to hide.

  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 whole QTableView

    No, you don't need to do anything with the model.
    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. qtableview:one table hide Column,and other tables not
    By chenmo20074639 in forum Qt Programming
    Replies: 6
    Last Post: 9th May 2014, 03:54
  2. How to hide QTableView Border
    By foxhengxing in forum Qt Programming
    Replies: 3
    Last Post: 5th April 2012, 12:31
  3. Replies: 1
    Last Post: 13th February 2012, 15:54
  4. Replies: 5
    Last Post: 13th November 2011, 20:49
  5. Hide rows from QTableView/QSqlRelationalTableModel
    By jiveaxe in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2009, 10:14

Tags for this Thread

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.