Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPixmap LoadFromData Not working in Qt 5.6
Forum Updated to NodeBB v4.3 + New Features

QPixmap LoadFromData Not working in Qt 5.6

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AutomataA Offline
    AutomataA Offline
    Automata
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      @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. ?

      1 Reply Last reply
      0
      • AutomataA Offline
        AutomataA Offline
        Automata
        wrote on last edited by
        #3

        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.

        mrjjM 1 Reply Last reply
        0
        • AutomataA Automata

          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.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Automata
          Hi
          So if you run that sample , it fails to read back the image or does it work?
          (in Qt 5.6 for you)

          1 Reply Last reply
          0
          • AutomataA Offline
            AutomataA Offline
            Automata
            wrote on last edited by
            #5

            It doesn't work at all

            mrjjM 1 Reply Last reply
            1
            • AutomataA Automata

              It doesn't work at all

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Automata
              Ok. it does here. also Qt 5.6.

              Could you have other Qt apps installed so other DLL or something like that can be found?
              else I have really no idea how its possible.

              1 Reply Last reply
              0
              • AutomataA Offline
                AutomataA Offline
                Automata
                wrote on last edited by
                #7

                I'd probe further and post my findings. Thank You

                1 Reply Last reply
                1

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved