PDA

View Full Version : Hide whole QTableView



ejoshva
5th February 2015, 05:26
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

wysota
5th February 2015, 06:35
You call hide() on the widget you want to hide. Or you use QStackedWidget.

ejoshva
5th February 2015, 11:26
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.

wysota
5th February 2015, 12:15
No, you don't need to do anything with the model.