Qt下sqlite如何进行多线程编程,如何避免数据库死锁。
SQLite Qt
------解决方案--------------------
Qt的数据连接不支持跨线程使用
在Assistant检索Thread-Support in Qt Modules
第一段话
Threads and the SQL Module
A connection can only be used from within the thread that created it. Moving connections between threads or creating queries from a different thread is not supported.
In addition, the third party libraries used by the QSqlDrivers can impose further restrictions on using the SQL Module in a multithreaded program. Consult the manual of your database client for more information
------解决方案--------------------
对跨线程的数据读写,主动加锁保护。