×

Discussion Board

Results 1 to 8 of 8

Hybrid View

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Running Qt application on device

    Hi all,

    I am writing a new Qt application which saves and reads files on application directory path, when I ran the app on simulator everything was ok but once I ran it on device (N8 and Maemo) it didn't work correctly...

    and the other issue I faced is opacity when I change opacity of my widget it works on simulator and the widget becomes transparent but on device it does not...how can I ensure having the app working exactly as simulator??!!!...any help plzz....

  2. #2
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Running Qt application on device

    Hi Maysoon88,
    On Maemo:
    - executables and data are in separate directories. So you have to read your data from /usr/share/apps/ or /opt/...
    - Widget opacity is supported only for homescreen widgets.

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Running Qt application on device

    Quote Originally Posted by gnuton View Post
    Hi Maysoon88,
    On Maemo:
    - executables and data are in separate directories. So you have to read your data from /usr/share/apps/ or /opt/...
    - Widget opacity is supported only for homescreen widgets.
    Hi gnuton

    I do read and write on this path: ("qApp->applicationDirectoryPath()+QDir::separator()") isn't that working on device ?? should I determine the exact path /user/share/apps/ !!!

  4. #4
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Running Qt application on device

    Hi,
    Correct you should not use QCoreApplication::applicationDirPath() at all.
    Maemo/MeeGo/Linux applications have:
    - read only data, installed by the package during the installation, in /usr/share/apps/our_application or /opt/usr/share/apps/your_application
    - read/write data in home/.your_application (the dot makes the directory hidden)

    Note that if you have to read/save settings then you can use QSettings that is more convenient since you don't have to deal with paths (which are system specific!).

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Running Qt application on device

    Its a little bit confusing .....I will try I hope it will work...
    thanks so much...

  6. #6
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Running Qt application on device

    hi gnuton again

    Actually I tried something like this:

    QDir *dir=new QDir("home/myAppName/dir");
    QFile *file=new QFile("home/myAppName/file.txt");

    but it didn't work!!! with qApp it was alittle bit better do you have any idea wher is my mistake??!!! knowing I need the data for read write not read only....

    I did another thing just like in this link: http://wiki.forum.nokia.com/index.ph...ate_path_in_Qt
    didnt work too

    I guess with qApp::applicationDirPath() it does read but not write or something like that!!!!
    Last edited by Maysoon88; 2010-11-23 at 14:38.

  7. #7
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Running Qt application on device

    I don't know about Maemo, but in Symbian, when you use a relative path, it is by default relative to the home directory of the app.

  8. #8
    Registered User
    Join Date
    Oct 2010
    Posts
    94

    Re: Running Qt application on device

    Hi all,,

    Am very sorry It is working now it was my fault from the beginning I forgot to make the directory am working in that was the main mistake qApp is working well on device it worked in simulator coz I made the directory manually, I just missed a very simple thing which is QDir().mkdir(qApp.applicationDirPath()+QDir::separator()+"myDirectory");
    sorry again...

Similar Threads

  1. Qt application running in backgound
    By sujatadas in forum Nokia N9
    Replies: 1
    Last Post: 2010-10-03, 21:18
  2. Application running on emulator but not running on Device
    By syedshakeel2004 in forum Symbian Signed Support, Application Packaging and Distribution and Security
    Replies: 3
    Last Post: 2010-09-28, 13:55
  3. Running QSensor examples using Nokia Qt SDK RC for Symbian device
    By sweedyar in forum [Archived] Qt SDKs and Tools
    Replies: 2
    Last Post: 2010-06-20, 12:07

Posting Permissions

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