I'm trying to use the beforeInsert() signal emitted by the QSqlRelationalTableModel in PyQt. However, even after I make edits to the model, the slot connected to the signal does't run. When exactly is the beforeInsert() signal emitted? Could someone show a working example of the use of beforeInsert(), or beforeUpdate() for that matter?
The documentation says "This signal is emitted by insertRowIntoTable() before a new row is inserted into the currently active database table". So it sounds like the signal is only emitted when insertRowIntoTable() is called, and not for any other type of model edit.
PyQt beforeInsert() signal