如题,在客户机器中未提示 QSqlDatabase:QODBC driver not loaded. QSqlDatabase:available drivers:(空)。这种情况大家一般如何解决?
------解决方案--------------------
do you Build the ODBC Plugin?
How to Build the ODBC Plugin on Windows
The ODBC header and include files should already be installed in the right directories. You just have to build the plugin as follows:
cd %QTDIR%\src\plugins\sqldrivers\odbc
qmake odbc.pro
nmake
------解决方案--------------------
一个资源:http://www.qtcn.org/bbs/read-htm-tid-44618-fpage-4.html
------解决方案--------------------
在程序目录下建立sqldrivers文件夹,把编译好的odbc driver扔进去就能搞定
------解决方案--------------------
------解决方案--------------------
在main.cpp 中加入:
QApplication::addLibraryPath("./");
为程序指定搜索路径。