I need to initialize a qpixmap object with its file directory
It works if I do the following: image = new QPixmap("C:/Users/Administrator/Desktop/maze/HTetris-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug/untitled/c12.bmp");
and it works with as well: image = new QPixmap("/Users/Administrator/Desktop/maze/HTetris-build-Desktop_Qt_5_0_1_MinGW_32bit-Debug/untitled/c12.bmp");
But this is just too long and too specific. I have put c12.bmp in the same file as the project itself. But image = new QPixmap("c12.bmp");
simply does not work.
Since this project needs to be portal, how can I do!!!!!!!
Thanks guys for help