Results 1 to 4 of 4

Thread: qpixmap.save() returns false

  1. #1
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default qpixmap.save() returns false

    hi,

    When i try to save the pixmap it returns false.

    1) I checked the pixmap.isNull but it returns false -> pixmap is not null.
    2) cross check with pixmap.size also returns valid qsize value.
    3) I checked the directory premissions, they are fine too. still i made a system call before save and set the newly created file permissions to 777 via chmod.
    (Also I run app as root).

    4) Docs do not indicate anything more.

    Please help.

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: qpixmap.save() returns false

    When there are problems with a program's code, mostly you should show the _code_. The problems can be simple and subtle, like a path with non-escaped backslashes.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qpixmap.save() returns false

    Try saving your pixmap as PNG. Does it work?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Mar 2012
    Location
    India
    Posts
    102
    Thanks
    4
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: qpixmap.save() returns false

    Hey thanks. I got it working. The problem was with the permissions indeed. I had made the system call for changing the permissions before opening the file (one of the side effects of programming on late saturday evening and not checking prints ).

    Thanks.

Similar Threads

  1. QSqlQueryModel insertColumn() returns false
    By kasper360 in forum Newbie
    Replies: 2
    Last Post: 28th March 2011, 04:58
  2. Qimage::save returns false in release
    By CCTeam in forum Qt Programming
    Replies: 5
    Last Post: 26th May 2010, 17:35
  3. QSslSocke::supportSsl() returns false
    By oscar in forum Qt Programming
    Replies: 1
    Last Post: 9th September 2008, 18:51
  4. QSqlQuery::isValid returns false
    By mismael85 in forum Qt Programming
    Replies: 24
    Last Post: 7th September 2008, 23:43
  5. connect returns false
    By krivenok in forum Qt Programming
    Replies: 6
    Last Post: 21st February 2006, 20:01

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.