Investigando sobre BROWSE

Investigando sobre BROWSE

Postby jnavas » 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[i]); // shifting rows after removing causes "bad removing"
@

To:
@
QList<int> rowIndexes;
for (int i = rowIndexes.count(); i >= 0; --i)
tableView->model()->removeRow(rowsIndexes[i]);
User avatar
jnavas
 
Posts: 479
Joined: Wed Nov 16, 2005 12:03 pm
Location: Caracas - Venezuela

Re: Investigando sobre BROWSE

Postby jnavas » Mon Apr 06, 2015 8:35 pm

Antonio
Ya logre remover un elemento de la lista, refresca automaticamente.

Code: Select all  Expand view

FUNCTION GETMODELRECORD(oBrw)
  LOCAL oIndex:=oBrw:currentIndex(1)
  LOCAL oModel:=oBrw:Model()
MSGINFO(oIndex:row(),oIndex:ClassName())

  oBrw:Model:removeRow(oIndex:row())

RETURN NIL
 
User avatar
jnavas
 
Posts: 479
Joined: Wed Nov 16, 2005 12:03 pm
Location: Caracas - Venezuela


Return to FiveTouch

Who is online

Users browsing this forum: No registered users and 1 guest