Cannot run SQL in release mode, but I can in debug mode..
Unsolved
General and Desktop
-
I am using Visual Studio 19. In release mode, the program gives warning like this:
QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available drivers: Could not open connection! "Driver not loaded Driver not loaded"
However it works pretty well in debug mode. How can I solve this problem?
-
@Baturtoraman
Start by setting environment variableQT_DEBUG_PLUGINS=1
and then running your program. See if that gives you more information about why it seemingly cannot find the driver in Release build though it can in Debug build.