Bryan Beutler
Sun, 07 Feb 2010 23:45:41 -0800
Sorry, I should point out that the EditStrategy refers to the QSqlTableModel I am using.
Bryan --- On Mon, 2/8/10, Bryan Beutler <bryanbeut...@yahoo.com> wrote: > From: Bryan Beutler <bryanbeut...@yahoo.com> > Subject: [PyQt] How to use QDataWidgetMapper with OnFieldChange EditStrategy > To: pyqt@riverbankcomputing.com > Date: Monday, February 8, 2010, 1:02 AM > Hi, > > I've used QDataWidgetMapper with the OnManualSubmit > strategy with no problems. > > Now I have a form that I need to update the database > immediately after each widget is edited as the user > traverses the form. I set the edit strategy > to OnFieldChange. The database gets updated > only on the first widget edited. > > For testing purposes, I called model.select() and > mapper.toFirst() after the first widget was edited. > The next widget edited now updates to the database, but no > more after that. > > Do I have to call select() and toFirst() after every > edit? This does not seem practical. Am I missing > something? > > Thanks, > Bryan > > > > > > _______________________________________________ > PyQt mailing list PyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > _______________________________________________ PyQt mailing list PyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt