[Solved] Display QTableView in QTabWidget or QWidget
-
Hi Peppe,
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:
[quote]
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.
[/quote]