GridTableView Class
GridTableView class implements a very common version of the view to display simple tabular data. More...
Header: | #include <GridTableView> |
Inherits: | GridViewBase |
Inherited By: | GridBandedTableView, GridTableViewVertical, and GridTreeView |
Detailed Description
View allows you to create columns of the grid at one level and relate them to the model's columns and data. An instance of the view is automatically created by grid once the type of view will be specifying - TableView. So later to obtain the pointer to the view instance you must use the method of the grid Qtitan::GridBase::view() with the GridTableView as a template parameter. For example:
Qtitan::Grid* grid = new Qtitan::Grid(); QSqlTableModel* model = new QSqlTableModel(...); grid->setViewType(Grid::TableView); Qtitan::GridTableView* view = grid->view<Qtitan::GridTableView>(); view->setModel(model);