Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Windows Phone prepopulated db
QtWS25 Last Chance

Windows Phone prepopulated db

Scheduled Pinned Locked Moved Mobile and Embedded
windows phonesqlitebundle
6 Posts 3 Posters 2.3k Views
  • 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.
  • M Offline
    M Offline
    marco.paglia
    wrote on 25 Aug 2015, 10:36 last edited by
    #1

    I am developing a cross platform (Android, IOS, WP) application that needs to have a prepopulated sqlite database.
    I edited the .pro file to embed the database into the App.
    It worked for iOS and Android but I could not find a solution for windows.
    Can someone help me?

    1 Reply Last reply
    0
    • P Offline
      P Offline
      Pablo J. Rogina
      wrote on 25 Aug 2015, 13:48 last edited by
      #2

      @marco.paglia by .pro file you mean the project file? would you mind sharing what you have so far?

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • M Offline
        M Offline
        marco.paglia
        wrote on 25 Aug 2015, 14:04 last edited by
        #3

        Yes, I mean the project file

        Here the code

        
        mac {
            cache()
        }
        
        #-------------------------------------------------------------------------------
        
        CONFIG += c++11 arcgis_runtime_qml10_2_6
        
        
        QT += core concurrent sql network gui opengl xml script positioning sensors svg
        QT += qml quick
        
        android:QT += sql
        win:QT += sql
        mac:QT += sql
        ios:QTPLUGIN += qsqlite
        
        TEMPLATE = app
        TARGET = my-app-qt
        
        #-------------------------------------------------------------------------------
        
        HEADERS += \
            AppInfo.h \
            update.h 
        
        SOURCES += \
            main.cpp \
            update.cpp 
        
        RESOURCES += \
            qml/qml.qrc \
            Resources/Resources.qrc
        
        OTHER_FILES += \
            wizard.xml \
            wizard.png
        
        #-------------------------------------------------------------------------------
        
        win32 {
            include (Win/Win.pri)
        }
        
        macx {
            include (Mac/Mac.pri)
            MediaFiles.files = Android/assets
            MediaFiles.path = Contents/MacOS
            QMAKE_BUNDLE_DATA += MediaFiles
        }
        
        ios {
            include (iOS/iOS.pri)
            MediaFiles.files = Android/assets/mydb.sqlite
            MediaFiles.path = ./
            QMAKE_BUNDLE_DATA += MediaFiles
        }
        
        android {
            include (Android/Android.pri)
        }
        
        
        1 Reply Last reply
        0
        • T Offline
          T Offline
          TioRoy
          wrote on 25 Aug 2015, 17:39 last edited by
          #4

          For Windows Phone, I use winphone entry, not win32 in .pro:

          winphone  {
                CONFIG += windeployqt
                WINRT_MANIFEST.version = 1.0.0.0
                .....
          }
          
          1 Reply Last reply
          0
          • M Offline
            M Offline
            marco.paglia
            wrote on 25 Aug 2015, 18:44 last edited by marco.paglia
            #5

            Thanks TioRoy.
            The problem is with the copy of a file (sqlite in this case) in the App package as for apk, ipa (Android and IOS).

            Simply I would like to know what are the variables to be used within the project file.
            Should I manage these files with Visual Studio?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              marco.paglia
              wrote on 26 Aug 2015, 05:35 last edited by marco.paglia
              #6

              I opened the project in Visual Studio.
              Now I have my files in the "Distribution Files".

              I think I should be able to access it with the QStandardPaths class.
              If I'm right I do not know which variable corresponds to that folder

              1 Reply Last reply
              0

              2/6

              25 Aug 2015, 13:48

              topic:navigator.unread, 4
              • Login

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