×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    24

    Building Qt app with SQL

    Hi

    I have a Qt app which uses the QSql library to load a built-in database.

    I have added QT += sql to the .pro and all works fine for my local builds. However, I have now submitted my app to the Ovi store, and it was rejected. Ova QA reported the app freezing, and I suspect it is related somehow to SQL access.

    I notice that the UID for Qt SQL does not appear in my app's .pkg, and nor does SQL appear as a dependency in my built .sis file.

    But as I can't reproduce this locally it's hard to be sure!

    Any help or ideas about this appreciated.

    QQ

  2. #2
    Registered User
    Join Date
    Aug 2007
    Posts
    4

    Re: Building Qt app with SQL

    ..........
    Last edited by funkybro; 2011-09-23 at 08:09.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    24

    Re: Building Qt app with SQL

    OK found the problem. Turns out my app works fine when installed to C: on the Symbian device, and not when installed to any other drive.

    This is because my database file (which lives in my .sis's root folder), was being loaded using

    db.setDatabaseName("mydatabase.db");

    This doesn't work when not installed on the C: drive (perhaps this is a problem with QSql). Anyway, the correct code is:

    db.setDatabaseName(QDir::toNativeSeparators(QCoreApplication::applicationDirPath() + "/mydatabase.db"));

    Hope this helps somebody else...

Similar Threads

  1. Building interactive 3d building info. in J2ME
    By CSFYPMAIL in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2008-11-18, 15:46
  2. Building lib or building dll?
    By baumannpan in forum Symbian
    Replies: 1
    Last Post: 2007-04-03, 12:59
  3. SIS building !!!???
    By noussaENSI in forum Symbian Tools & SDKs
    Replies: 4
    Last Post: 2007-03-23, 16:42
  4. Building and OS
    By verenden in forum Mobile Java General
    Replies: 4
    Last Post: 2006-02-02, 06:53
  5. Building
    By pacman2000z in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2003-07-17, 10:44

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×