Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // search button
- void MainWindow::on_pushButton_released()
- {
- QString info = ui->info->text();
- int column = ui->column->text().toInt(); // manual column num input
- int rowcount = ui->tableNew->rowCount();
- on_pushButton_2_released();
- for (int i = 0; i < rowcount; ++i)
- {
- if ( ui->tableNew->item(i, column)->text() == info )
- continue;
- ui->tableNew->hideRow(i);
- }
- }
- // clear search button
- void MainWindow::on_pushButton_2_released()
- {
- int rowcount = ui->tableNew->rowCount();
- for (int i = 0; i < rowcount; ++i)
- {
- ui->tableNew->showRow(i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement