PDA

View Full Version : How to get the size of a QWidget in QTabWidget



xiangxw
3rd May 2011, 15:33
Hi,I have a QTableView in a QTableWidget

addTab(new MyTableView,tr("what"));
How can I get the viewport of the QTableWidget.
Who is the parent of the QTableView.
Thanks

wysota
4th May 2011, 00:45
Hi,I have a QTableView in a QTableWidget

addTab(new MyTableView,tr("what"));
You mean a table view inside a tab widget?


How can I get the viewport of the QTableWidget.
If you ask about QTableWidget then use its viewport() method. If you ask about the tab widget then it doesn't have a viewport.


Who is the parent of the QTableView.
If you mean your code snippet then the direct parent will be the stacked widget inside QTabWidget.