11#include <QApplication>
13#include <QItemSelectionModel>
18int main(
int argc,
char *argv[])
47 firstTableView->setWindowTitle(
"First table view");
48 secondTableView->setWindowTitle(
"Second table view");
49 firstTableView->show();
50 secondTableView->show();
virtual Q_INVOKABLE bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Sets the role data for the item at index to value.
QItemSelectionModel * selectionModel() const
Returns the current selection model.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Returns the index of the data in row and column with parent.
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
\macro QT_RESTRICTED_CAST_FROM_ASCII
The QTableView class provides a default model/view implementation of a table view.
void setModel(QAbstractItemModel *model) override
\reimp
QHeaderView * horizontalHeader() const
Returns the table view's horizontal header.
void setSelectionModel(QItemSelectionModel *selectionModel) override
\reimp
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
QSqlQueryModel * model
[16]
QApplication app(argc, argv)
[0]