You did not open your file for reading as indicated by the error messag "device not open".
@VRonin Thank you for reply, but my problem is the load image from database, please see my another question:
QT 5.8 image from database error
No one has replied
Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.