×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2010
    Location
    Finland
    Posts
    91

    Question Opening file in MeeGo not working?

    I'm trying to open image in Qt like this

    I have image in path /home/user/MyDocs/Pictures/Objects008.jpg

    I want to open it in Qt code:
    QFile file("/home/user/MyDocs/Pictures/Objects008.jpg");
    but if i try file.readAll() it's emty?

    Other try was like this, but it didn't work any better, empty readAll()

    QFileInfo finfo("/home/user/MyDocs/Pictures/Objects008.jpg");
    QFile file(finfo.absoluteFilePath());
    With this the path was changed to /home/developer/home/user/MyDocs/Pictures/Objects008.jpg


    What kind of path should I use to make it to work?

  2. #2
    Super Contributor
    Join Date
    Oct 2007
    Location
    જુનાગઢ - India
    Posts
    3,034

    Re: Opening file in MeeGo not working?

    You have to open file, using QFile::Open() method, before reading.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Location
    Finland
    Posts
    91

    Re: Opening file in MeeGo not working?

    Quote Originally Posted by savaj View Post
    You have to open file, using QFile::Open() method, before reading.

    Yeah, I did that already. But got it to work when removed the home/user/ path from the start.

Similar Threads

  1. Replies: 11
    Last Post: 2011-10-10, 23:32
  2. Replies: 1
    Last Post: 2011-05-11, 21:30
  3. [moved] Qml is not working in MeeGo sdk 1.1
    By kotesh.06521 in forum [Archived] Qt SDKs and Tools
    Replies: 6
    Last Post: 2011-03-16, 12:48
  4. Replies: 2
    Last Post: 2010-10-22, 23:35
  5. Replies: 13
    Last Post: 2010-08-25, 07:32

Posting Permissions

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