Hi,
Here is a piece of (pseudo) code from my application
Problem is : when last section of example is commented in, view will show wrong number of lines. If first select returns one row, and second also one, then view shows two lines : one is containing last result and second is just empty row.Code:
model->setTable(tables->currentText()); model->setFilter("id=2"); model->select(); view->setModel(model); /*model->setTable(tables->currentText()); model->setFilter("id=3"); model->select();*/
Problem goes away if setTable is not used second time, but there is nowhere said, that setTable is forbidden to use twice.
PS: second select is after "view->setModel(model);" because in real application it is called in slot, not in same method as first select and view/model creation.
A Qt bug?