Qt-interest Archive, January 2008
QSqlDatabase
Message 1 in thread
At some point after connecting to a Postgresql database via QSqlDatabase, I
cause an unexpected disconnect (ie, pull the ethernet cable from the
computer).
After that, I check database->isOpen(), and it says true.
So, I try to database->exec(some_query), and it hangs (for at least 2-3
minutes, perhaps longer).
what is the preferred method of:
1 - identifying database disconnect
2 - prevent QSqlDatabase::exec(...) from hanging
Of course one option is to create a threaded wrapper class.
Other ideas?
Thanks
--
[ signature omitted ]