Qt World Summit: Register Today!

question about path

  • Hello,
    I have a little question,

    On my app i use absolut path for load a picture

    QPixmap pix("E:/deployment/repix/"+name_pic+number_pic+".png");

    but i would like to use a path that would allow the file to be found only from :


    because the application once deployed will not necessarily have the path :E but can be :C/users with random users.

    Only this part of the path will remain unchanged :


    if you have a tip it's very cool :)

  • This post is deleted!

  • QCoreApplication::applicationDirPath()+ QStringLiteral("deployment/repix/")+name_pic+number_pic+ QStringLiteral(".png");

  • @VRonin yeah great super efficace !
    thanks you, lean and simple you are wonderfull :)

Log in to reply