submitAll() returns true or false based on success. You can take advantage of this.

Qt Code:
  1. if (submitAll())
  2. // requery and check what has been added (you can do that before adding too)
  3. else
  4. // some error occured
To copy to clipboard, switch view to plain text mode 

Note though that this will block till all the data is added.