QPixmap LoadFromData Not working in Qt 5.6
-
Hello all, please I just migrated from Qt 4.8 to Qt 5.6, but my piece of code that saves an image to a database and retrieves it back into a QByteArray does not load from QPixmap's LoadFromData. Using a Qt 4.8 version of this same piece of code works perfectly, only when I go back to the Qt 5.6 version does it cease to work. I've unbelievably spent days looking for the solution this problem.
Any help would be appreciated.
Thanks in advance.
NB: I haven't posted the code because it's the documented sequence of statements that I have used, which works perfectly for Qt 4.8.
I'm developing on a Windows 7 machine -
@Automata said:
LoadFromData
Hi and welcome.
You could try this sample for test
https://wiki.qt.io/How_to_Store_and_Retrieve_Image_on_SQLite
I ran it here on win 10 , Qt 5.6, mingw and it can use LoadFromData it
seems. Maybe try with your image and see if it's a format issue
or maybe it could provide additional info. ? -
Thanks for your response. I have in fact seen that link you posted and almost every other thing related on the internet before posting here. The problem is really strange to me. Perhaps, it has to do with a corrupted library on my system. I have since downgraded my code to Qt 4.8 in order not to continue loosing time on my development.