> I've written a stock portfolio tracker in pyqt4. The main window which<br>> is a QAbstractTableModel has an Update button. When I click it, the<br>> program gets new stock prices and updates the data in the table.<br>
><br>> My problem is that the data displayed in the table doesn't update until<br>> the window loses and regains focus....<br><br>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 described here:<br>
<br><a href="http://doc.trolltech.com/4.5/qtsql.html#inserting-updating-and-deleting-records">http://doc.trolltech.com/4.5/qtsql.html#inserting-updating-and-deleting-records</a><br><br>Simon Hibbs<br><br><br><br><br><br><br>
<h1></h1>