[Solved] Display QTableView in QTabWidget or QWidget
Kindly help me out with this issue. I have a QTableView object which i display currently using
How will i display this tableview object inside a tab say x within QTabWidget y?
Add it to that tab. See QTabWidget docs.
I understand i have to add it to the tab, i am not understanding how to do that.
Ok, so... I guess docs are not that good. Exactly which parts of QTabWidget docs are unclear in your opinion, so we can explain them to you?
I have created several standalone programs now i have to merge them into one Tab Widget. One of the program was to create a QTableView and i display it using @qtableview_objectname.show()@
Now how do i display this qtableview object in one of the tabs ? I understand i have to probably just add one line which would be something like ui->tab_name-> ???? i am unable to figure this out. How to add the tableview object say x to tab y
Thanks for helping
From the "documentation":http://doc.qt.nokia.com/4.7/qtabwidget.html:
The normal way to use QTabWidget is to do the following:
- Create a QTabWidget.
- Create a QWidget for each of the pages in the tab dialog, but do not specify parent widgets for them.
- Insert child widgets into the page widget, using layouts to position them as normal.
- Call addTab() or insertTab() to put the page widgets into the tab widget, giving each tab a suitable label with an optional keyboard shortcut.