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. Displaying of .jpeg graphics in runtime - missing photos
Forum Updated to NodeBB v4.3 + New Features

Displaying of .jpeg graphics in runtime - missing photos

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 5 Posters 1.8k Views 2 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.
  • C Offline
    C Offline
    cscibiorek
    wrote on last edited by
    #1

    hi,
    In my application Im displaying some .jpeg graphics as a pushbuttons (graphic .jpg on pushbuttons)
    Im making simple visibility of button true or false.
    I have a problem because after building I dont see any graphic files (only pushbuttons). Do You have any ideas what is the problem?

    [QT 5.8 on Windows 64 bit]

    mrjjM 1 Reply Last reply
    0
    • C cscibiorek

      hi,
      In my application Im displaying some .jpeg graphics as a pushbuttons (graphic .jpg on pushbuttons)
      Im making simple visibility of button true or false.
      I have a problem because after building I dont see any graphic files (only pushbuttons). Do You have any ideas what is the problem?

      [QT 5.8 on Windows 64 bit]

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

      @cscibiorek
      Hi can you show how you add the images ?

      1 Reply Last reply
      2
      • dheerendraD Offline
        dheerendraD Offline
        dheerendra
        Qt Champions 2022
        wrote on last edited by kshegunov
        #3

        I suspect path issues with your jpeg files. Are u specifying the absolute path or relative path ? R u bundling images in resources ? Is it qt widgets or qml ?

        [Edit: Both QML and QtWidgets are part of Qt ~kshegunov]

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply
        8
        • VRoninV Offline
          VRoninV Offline
          VRonin
          wrote on last edited by
          #4

          said in Displaying of .jpeg graphics in runtime - missing photos:

          Windows 64 bit

          Did you forget to deploy the imageformat plugin?

          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
          ~Napoleon Bonaparte

          On a crusade to banish setIndexWidget() from the holy land of Qt

          1 Reply Last reply
          3
          • C Offline
            C Offline
            cscibiorek
            wrote on last edited by
            #5

            Hi,
            I have no idea what are You asking about. Can You guide me?

            VRoninV 1 Reply Last reply
            0
            • C cscibiorek

              Hi,
              I have no idea what are You asking about. Can You guide me?

              VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #6

              I think it boils down to:

              • Can you show the code where you set the image on the button?
              • Do you get the problem even when you start it from Qt Creator (or whatever IDE you use) or only when you start it from the .exe file?

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              1 Reply Last reply
              2
              • M Offline
                M Offline
                mostefa
                wrote on last edited by mostefa
                #7

                @cscibiorek

                First of all ,is your images present on qrc ?

                http://doc.qt.io/qt-5/resources.html

                if yes ?

                are you running your application from qtcreator? or directly from binary ?

                as @VRonin said, i think also that the problem is related to missing imageformat plugin,

                have a look at this link :

                http://doc.qt.io/qt-5/qtimageformats-index.html#deployment

                When built, the Qt Image Formats plugins are located as dynamic libraries in the runtime plugin directory (typically plugins/imageformats), together with the default image format plugins. They may be deployed to the target system in the same way as other plugins, see the Deploying Plugins documentation

                After understanding this first part ,you can use qt.conf:

                http://doc.qt.io/qt-5/qt-conf.html

                Hope this can help !

                1 Reply Last reply
                3

                • Login

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