QDataWidgetMapper not repopulating fields in production



  • I am using QDataWidgetMapper to map a bunch of fields on a form. On my development machine, everything works as expected:

    Open form

    Add Data

    Save Form (data to SQLite Db)

    Reopen form

    Data is displayed

    When I run the software in a clean virtual machine and customers run it in their environment, the data is never displayed. I am thinking that I am missing a DLL that is not required. Here is what I am shipping right now:

    QtCore4.dll
    QtGui4.dll
    QtGuid4.dll
    QtNetwork4.dll
    QtScript4.dll
    QtSql4.dll
    QtSvg4.dll
    QtXml4.dll

    Any suggestions on why it isn't working in production?



  • You will also need to ship qsqlite.dll in sqldrivers subfolder.

    QtCore4.dll
    QtGui4.dll
    ...
    sqldrivers
    ...................... qsqlite.dll


  • Lifetime Qt Champion

    Hi,

    Besides the potentially missing plugin, do you create the initial database in your program or is it provided with your executable ?



  • I do have the qsqlite4.dll, along with all the imageformats plugins. Is there anything else I might be missing? Any other suggestions, other than missing DLL's, on why this doesn't work in production?


  • Lifetime Qt Champion

    Are you sure you put the dlls in the correct place ?
    i.e:
    plugins/imageformats
    plugins/sqldrivers

    The hierarchy is important



  • here is the thing that is strange: The DB is being used by 2 other processes on the machine (bad idea with SQLite, I know, I am working on moving to a different DB) and in general, all works well. The Qt program generally works well, too, except in this one case. That is why I was thinking there might be some DLL that helps implement the QDataWidgetMapper functionality or something. If it isn't a missing DLL, then the only thing I can figure it that I am not clearing something in the release code that I am in development.

    I do jump between C# and C++, in the C# world it is bad to initialize variables to null/zero, so... I might have forgotten to initialize something in the Qt class, think I will go double check:)

    Sam


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.