On my Linux box the only problem that I experienced was sometimes the highlight didn't show up until the mouse was over the view. Works well otherwise.
See if this fixes things. Add this statement to the MainWindow constructor:
ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
To copy to clipboard, switch view to plain text mode
and add an update at the end of the slot:
void MainWindow::pbClicked(){
QModelIndexList list = ui->tableView->selectionModel()->selectedRows();
ui->tableView->hideRow(index.row());
}
highlightCells();
ui->tableView->update();
}
void MainWindow::pbClicked(){
QModelIndexList list = ui->tableView->selectionModel()->selectedRows();
foreach(QModelIndex index, list){
ui->tableView->hideRow(index.row());
}
highlightCells();
ui->tableView->update();
}
To copy to clipboard, switch view to plain text mode
Edit: Oops. I see what you mean. It doesn't work if the view is sorted by a different column
Bookmarks