[PyQt] How to update an QAbstactTableModel
simon.hibbs at gmail.com
Tue Dec 8 15:14:41 GMT 2009
> I've written a stock portfolio tracker in pyqt4. The main window which
> is a QAbstractTableModel has an Update button. When I click it, the
> program gets new stock prices and updates the data in the table.
> My problem is that the data displayed in the table doesn't update until
> the window loses and regains focus....
If you're loading the data into the database directly using SQL, then QT
won't be aware of the change. You could tryusing
QSqlRelationalTableModel.setData() to push the data into the model. It's
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt