Hi,

I've been trying to make use of the QSqlQueryModel class to display items in a list view while retaining extra data that I need later on. This removes the need for another db call.

QSqlQueryModel has a function called 'record' which returns a QSqlRecord.
If I try to instantiate a QSqlRecord or any call which creates a QSqlRecord, ie the call to 'record' I get the following error when compiling:

Error 2 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QSqlRecord::~QSqlRecord(void)" (__imp_??1QSqlRecord@@QAE@XZ) referenced in function "private: void __thiscall ImageView:n_lwImages_clicked(class QModelIndex)" (?on_lwImages_clicked@ImageView@@AAEXVQModelIndex@ @@Z) imageview.obj

If I try to declare 'QSqlRecord *record;' then the build error isn't raised, it's only when a call to create the object is used.

I'm running 4.1.4 on Win32 in VS 2k5.
I actually built Qt with nmake from 2k3 so I thought maybe that was causing some problems. So I tried it in 2k3 and the issue was still there.

My 4.1.4 folder doesn't actually have the object file, only headers which explains the error, but my 4.2.0-snapshot-20060923 has the debug and release obj under /src/sql/tmp/obj.
4.2.0 was the release I was using when I found the problem, even though these obj's are there.

I'm building the MySql plugin in each version, and all other QSql module classes I've used are working, so can anyone suggest why these aren't being built / linked into the final libraries?



Thanks,

Steve