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:
but if i try file.readAll() it's emty?QFile file("/home/user/MyDocs/Pictures/Objects008.jpg");
Other try was like this, but it didn't work any better, empty readAll()
With this the path was changed to /home/developer/home/user/MyDocs/Pictures/Objects008.jpgQFileInfo finfo("/home/user/MyDocs/Pictures/Objects008.jpg");
QFile file(finfo.absoluteFilePath());
What kind of path should I use to make it to work?

Reply With Quote


