[PyQt] lastQuery() from an QSqlRelationalTableModel

Scott Frankel frankel at circlesfx.com
Thu Aug 13 22:44:09 BST 2009


Hello,

How can I view the last query submitted to an QSqlRelationalTableModel  
instance?

I'm trying to debug a data-widget mapped form's submitAll() that is  
not storing one of it's mapped members.

I've made numerous stabs at things like:

		theQuery = QtSql.QSqlQueryModel.query()
		theQuery = QSqlQuery.QSqlQueryModel.query()
		theQuery = QtSql.QSqlQuery.query()

		print "query: ", theQuery.lastQuery()

But I haven't quite cracked it.

Thanks in advance!
Scott








More information about the PyQt mailing list