Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Image in ListView don’t work correctly

Image in ListView don’t work correctly

Scheduled Pinned Locked Moved Installation and Deployment
5 Posts 2 Posters 3.6k 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.
  • AlicemirrorA Offline
    AlicemirrorA Offline
    Alicemirror
    wrote on last edited by
    #1

    Hi, I'm experiencing a very strange problem developing a QML application under windows (XP and Win7)

    The application was developed under Ubuntu then thanks to QT platform works fine under windows. One of the features of this app is to create a list from xml data (twitter feeds). To be able to deliver the QML program to the users I created a project where main.cpp program work as the launcher of the QML application.

    Well, under windows if I start the application with QT ide installed, everything works fine. If I put the compiled program (that has all the needed dll) in a fresh windows xp installation, the application work, but the list shows only the text that is in the delegate while the image icon isn't shown. This problem occours only with the compiled application.

    Thank you if you have some idea.

    Enrico Miglino (aka Alicemirror)
    Balearic Dynamics
    Islas Baleares, Ibiza (Spain)
    www.balearicdynamics.com

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Did you, per chance, forget to install the plugins to handle image file types?

      1 Reply Last reply
      0
      • AlicemirrorA Offline
        AlicemirrorA Offline
        Alicemirror
        wrote on last edited by
        #3

        Hi, thankyou for this answer, that opens a new door to my mind... :)

        Please, can you explain more in details ? It is possible, but I don't find any about this difference in the QT documentation...

        P.S. The problem resides in qml sources of the interface of the app.

        Thanks.

        Enrico Miglino (aka Alicemirror)
        Balearic Dynamics
        Islas Baleares, Ibiza (Spain)
        www.balearicdynamics.com

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          How do you know the problem is in the QML sources?

          Anyway, look for the topic on "Deploying plugins" in the Qt documentation.

          1 Reply Last reply
          0
          • AlicemirrorA Offline
            AlicemirrorA Offline
            Alicemirror
            wrote on last edited by
            #5

            It's the "refrain" of the already opened discussion "Image in ListView don’t work correctly".

            The problem happened in the images associated to some text created in a component, then showed in a List View. Initially I though that the problem was in the component or in the list, because theit run only image that wasn't loaded in the app was there.
            I tried a lot of tests and changes and finally I found the problem: the REAL difference between the images in the list component and the other images is that these are jpeg while the other are png.
            The application works fine with both jpeg and png files while is running in the QT Creator environment (under windows or ubuntu). When I compile the code under windows, jpeg images cant be loaded!!!
            The obvious solution had been to convert these jpeg in png format, but this cant explain why does it happens.

            All the libraries and components of this app (Mingw, Qt... dlls etc) are set correctly but jpeg images ARE IGNORED by the windows compiled program. Consider that the list management that don't work is not part of the C++ source code but is one of the QML sources. To see the application working I only changed a line of the QML code (.jpg to .png) and substituted the images in the corresponding folder. The compiled program (that work as QML launcher) was not recompiled and all works fine.

            Someone has an idea of what I have missed? This workaround solve the problem in this particular case, but it is not a true solution because this means that all my apps that should retrieve a jpg file from the web can evidentiate this problem.

            Thank you :)

            Enrico Miglino (aka Alicemirror)
            Balearic Dynamics
            Islas Baleares, Ibiza (Spain)
            www.balearicdynamics.com

            1 Reply Last reply
            0

            • Login

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