This is attempt 2 (still doesn't compile).
Can anyone point me in the right direction? I don't have a clue what im doing.
void SerialNumberProg::columnsTrial(
) {
tw->setModel( model );// DOESN'T LIKE THIS LINE...
int rowcount = tw->rowCount();
tw->setRowCount( rowcount + 1 );
tw->setItem( rowcount, 0, item );
tw->setItem( rowcount, 1, item );
m_qtapp->AllocateEcoComboBox->setView( tw );
delete( tw );
}
}
void SerialNumberProg::columnsTrial(
) {
QTableWidget *tw;
if( ( tw = new QTableWidget( 0, 2, m_qtapp )) != NULL ) {
QTableWidgetItem *item;
QAbstractItemModel *model = m_qtapp->AllocateEcoComboBox->model();
tw->setModel( model );// DOESN'T LIKE THIS LINE...
int rowcount = tw->rowCount();
tw->setRowCount( rowcount + 1 );
item = new QTableWidgetItem( "id" );
tw->setItem( rowcount, 0, item );
item = new QTableWidgetItem( "date" );
tw->setItem( rowcount, 1, item );
m_qtapp->AllocateEcoComboBox->setView( tw );
delete( tw );
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks