Hi all,
Can some help me with MODEL/VIEW programming in QT4
I have program for database of humans, and i display small table with katalog of peoples,
I used on this Q3Tab in new widget, and my katalog is stored in container „vector“…
here is link screen my pgm
void MainWindow::show_table()
{
Tab *tabulka = new Tab;
tabulka->table->setNumRows(people.size());
tabulka->table->setColumnWidth ( 0, 115 );
tabulka->table->setColumnWidth ( 1, 115 );
tabulka->table->setColumnWidth ( 2, 70 );
for( int row= 0; row < people.size() ; row++)
{
tabulka->table->setText(row,0,people[row].surname);
tabulka->table->setText(row,1,people[row].first_name);
tabulka->table->setText(row,2,people[row].number);
tabulka->table->sortColumn(0,TRUE,TRUE);
}
tabulka->table->setReadOnly(TRUE);
tabulka->show();
}
„people“ is container style vector..
But i have to show this my table via MODEL/VIEW programming,
I readed qt-Assistant but i dont know still, how i can make it, pls help me with this
and sory for my bad english
Bookmarks