Important: Please read the Qt Code of Conduct -

[Solved] How to build sql driver plugin with Qt SDK

  • How to build sql driver plugin with Qt SDK, is it possible? Problem described "here": actually.

    Seems like it is impossible to build sql plugin without manual file copying recent time. qsql_sqlite.cpp refers to <QtSql/private/qsqlcachedresult_p.h>, however file located in \QtSDK\QtSources\4.7.3\src\sql\kernel\ so compiler can't find it. I.e. header files located in wrong place in Qt SDK, that is why it is impossible to build plugin automatically: need to copy file manually but this is inconvenient. Is somebody had such issue, how to solve it? Is it necessary to build own Qt version or what?

    Also sql plugins build documentation is outdated.

  • Hmm, headers is in right place in 4.8...

  • Solved, write to me if interesting.

  • Need to install 4.8 beta in SDK (experimental part), including sources. I thought that I need many sources from Qt, but need only 2 source files: qsql_sqlite.cpp/h and qsqlcachedresult_p.h (not code stub, but with class definition) and 3 .pri files (however you may remove them at all as the do not hold any useful functionality) and change paths in them to yours. I had taken all of that from 4.8 and simply copied to my project (no need to build driver utilizing whole source tree).

Log in to reply