Is there a way to print a QSqlTableModel/QueryModel's SQL code that is sent to the database? (I am working with filters and would like to use this for debugging purposes)
Something like:
self.model = QSqlTableModel()
self.model.setTable("Person")
print(self.model.sql) #there is no command like .sql