QTable - Simple work with models

Qt Components

Source (required if based on other people's work):

0
Score 50%
Description:

QTable is table wrapper for table models (and for any models in general case).
The purpose of this class is to simplify work with tables for novices in Qt.

Use this class to simply create and manipulate table with ability to link to various viewers (for example, to QTableView).

Example of usage:

// Making
static QTable table;
ui->tableView->setModel( table.model() );
// Cofiguring
table.setColumnCount(3);
table.setColumnHeaders( QTableLine( \"Name\", \"Product\", \"Cost\" ) );
// Add data
table.appendRow( QTableLine( \"V. Pupkin\", \"Car\", \"22000\" ) );
table.appendRow( QTableLine( \"I. Ivanov\", \"T-Shirt\", \"15\" ) );
// Manipulate data
int sum = table.value(0,2).toInt() + table.value(1,2).toInt();
table.set( 0,2, 22500 );


By default QTable makes instance of QTableModel - the model-class of editable QVariant table. You can access to this model using model() member of QTable instance.

Also QTable can use external models; you can change the root index of model for table manipulating.
Last changelog:

6 years ago

1.0 pre-alpha:
* First release.

Be the first to comment

6 years ago

1.0 pre-alpha:
* First release.

product-maker 6 6

File (click to download) Version Description Packagetype Architecture Downloads Date Filesize DL OCS-Install
Pling
Details
license
version
1.0 pre-alpha
updated Jan 31 2012
added Jan 31 2012
downloads today
0
page views today 1
System Tags app software