Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDataWidgetMapper not repopulating fields in production

QDataWidgetMapper not repopulating fields in production

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scarleton
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      cincirin
      wrote on last edited by
      #2

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

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

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

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

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • S Offline
          S Offline
          scarleton
          wrote on last edited by
          #4

          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?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

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

            The hierarchy is important

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • S Offline
              S Offline
              scarleton
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved