Thanks for the answer , but this dosn't work i set the table like this :
m_pPlayListMiniItemDelegate =new PlayListMiniItemDelegate(this);
ui->PlayListMini_tableView->setItemDelegate(m_pPlayListMiniItemDelegate);
ui->PlayListMini_tableView->setAlternatingRowColors(true);
ui->PlayListMini_tableView->setModel(PlayListMiniSqlModel::instance());
ui->PlayListMini_tableView->hideColumn(0);
ui->PlayListMini_tableView->hideColumn(1);
m_pPlayListMiniItemDelegate =new PlayListMiniItemDelegate(this);
ui->PlayListMini_tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
ui->PlayListMini_tableView->setSelectionMode(QAbstractItemView::SingleSelection);
ui->PlayListMini_tableView->setItemDelegate(m_pPlayListMiniItemDelegate);
ui->PlayListMini_tableView->setAlternatingRowColors(true);
ui->PlayListMini_tableView->setModel(PlayListMiniSqlModel::instance());
ui->PlayListMini_tableView->hideColumn(0);
ui->PlayListMini_tableView->hideColumn(1);
To copy to clipboard, switch view to plain text mode
and inside the PlayListMiniSqlModel::instance()
i execute simple sql that returns 3 results in a row.
"SELECT foo1,foo2,foo3 FROM tbl"
the hide column 0,1 dosnt work i still see 3 column in raw.
also i follow this tutorial :
http://www.jwdougherty.com/content/q...ser-interfaces
Bookmarks