Hi,

Im connecting to my mysql database and i want know if the error type of db.lastError is equals to SqlError::ErrorType::NoError, but everything that i tried i got error.

Can anyone help me?

Something like this:

Qt Code:
  1. if (db.lastError().type() == QSqlError::ErrorType::NoError)
  2. {
  3. ....
  4. }
To copy to clipboard, switch view to plain text mode