Qt Code:
QSqlTableModel *model; model->setTable("clientcategory"); model->select(); ui->tableView->setModel(model); ui->tableView->hideRow(0);To copy to clipboard, switch view to plain text mode
Does't really hide that row?![]()
Qt Code:
QSqlTableModel *model; model->setTable("clientcategory"); model->select(); ui->tableView->setModel(model); ui->tableView->hideRow(0);To copy to clipboard, switch view to plain text mode
Does't really hide that row?![]()
Sure it does.
Now try to explain what you expected to see, what you actually saw, and why you think they are different.
ups I put it wrong, I wanted to say when a tableview is attached to combobox, suppose like this:
Qt Code:
model->setTable("legaltype"); model->select(); QTableView *view1; ui->combobox->setModel(model); ui->combobox->setView(view1); view1->hideColumn(0); ;To copy to clipboard, switch view to plain text mode
first column is hidden (index 0). The height of a drop-down table becomes the size of a combobox height itself (no matter the size of combobox height), so that only Column Headers are visible... and this happens only when the firsts (0 index) column is hidden. For any other column hidden everything goes fine.
Bookmarks