Search code examples
c++qtqtguiqpixmapqdebug

QPixmap::save() returns successful, but yields no file


The docs say this should work:

bool did=pixmap.save( "hoppy.png" );

qDebug("did is: %d",did);

My logging returns 1 suggesting, as per docs, that the save was successful. However, no file appears on my drive. According to the docs, this save() should indeed save a file, so what is missing?


Solution

  • Another answer notes:

    Nothing missing; it is simply saved to the folder of where you run the qt executable from

    However my question indicated that this is actually not the case here.

    Using the full path rather than a relative path or instead of using the ~ character, resolved it.