There is only one view. The highest and lowest value in a column is highlighted in the view. I want the user to be able to remove a row from the view (without removing it from the source) The problem isn't in hiding the row, it is in highlighting the correct row AFTER a row is hidden.
I forgot to show the code for hiding the row;
void DlgPrintPreview::on_btnDeleteRow_clicked()
{
if (!index.isValid())
return;
ui->printView->setRowHidden(index.row(),true);
highlightCells();
}
void DlgPrintPreview::on_btnDeleteRow_clicked()
{
QModelIndex index = ui->printView->currentIndex();
if (!index.isValid())
return;
ui->printView->setRowHidden(index.row(),true);
highlightCells();
}
To copy to clipboard, switch view to plain text mode
Bookmarks