Investigando sobre BROWSE
Posted: Mon Apr 06, 2015 8:29 pm
Antonio
Saludos Cordiales, hoy seguire evaluando las funcionalidaes de QT
Para manipular los browsese, encontre esta documentacion, necesito remover lineas del browse, encontre:
https://forum.qt.io/topic/23600/solved- ... ted-rows/3
Yea, I am using that one.
But I have solved that by decrementing (and removing from the end of the table view, not from the beginning):
I shouldn't increment over the list and remove the first items because table was shifting rows after I have removed one - and that was making issues. So I had to write decrementing cycle and removing from the end of the table view - after shifting I am able to remove the correct row.
From:
@
QList<int> rowIndexes;
for (int i = 0; i < rowIndexes.count(); ++i)
tableView->model()->removeRow(rowsIndexes); // shifting rows after removing causes "bad removing"
@
To:
@
QList<int> rowIndexes;
for (int i = rowIndexes.count(); i >= 0; --i)
tableView->model()->removeRow(rowsIndexes);
Saludos Cordiales, hoy seguire evaluando las funcionalidaes de QT
Para manipular los browsese, encontre esta documentacion, necesito remover lineas del browse, encontre:
https://forum.qt.io/topic/23600/solved- ... ted-rows/3
Yea, I am using that one.
But I have solved that by decrementing (and removing from the end of the table view, not from the beginning):
I shouldn't increment over the list and remove the first items because table was shifting rows after I have removed one - and that was making issues. So I had to write decrementing cycle and removing from the end of the table view - after shifting I am able to remove the correct row.
From:
@
QList<int> rowIndexes;
for (int i = 0; i < rowIndexes.count(); ++i)
tableView->model()->removeRow(rowsIndexes); // shifting rows after removing causes "bad removing"
@
To:
@
QList<int> rowIndexes;
for (int i = rowIndexes.count(); i >= 0; --i)
tableView->model()->removeRow(rowsIndexes);