Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Quick cross compiled application didn't show images on raspberry pi 4
Forum Updated to NodeBB v4.3 + New Features

Qt Quick cross compiled application didn't show images on raspberry pi 4

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 2 Posters 496 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.
  • aminaA Offline
    aminaA Offline
    amina
    wrote on last edited by
    #1

    I cross compiled Qt5.14.2 for my raspberry pi 4 on a raspberry pi OS lite

    after that I created a Qt Quick application on my Ubuntu and I integrated images in my qml file

    Image {
            id: compteur
            x: 223
            y: 102
            width: 570
            height: 227
            source: "images/b2.png"
        }
    

    so the image b2.png on my ubuntu is under ~/Desktop/test_v1/images and the executable test_v1 was generated under ~/Desktop/build-test_v1-Qt5pi-Release

    on my raspberry pi I copied this executable and copied also all the directory test_v1

    but when executing the application it worked well but the images didn't show up

    I tried also to put the images and the executable in the same directory but couldn't work also.

    if you know what should I change please tell me !

    Thank you in advance

    K 1 Reply Last reply
    0
    • aminaA amina

      I cross compiled Qt5.14.2 for my raspberry pi 4 on a raspberry pi OS lite

      after that I created a Qt Quick application on my Ubuntu and I integrated images in my qml file

      Image {
              id: compteur
              x: 223
              y: 102
              width: 570
              height: 227
              source: "images/b2.png"
          }
      

      so the image b2.png on my ubuntu is under ~/Desktop/test_v1/images and the executable test_v1 was generated under ~/Desktop/build-test_v1-Qt5pi-Release

      on my raspberry pi I copied this executable and copied also all the directory test_v1

      but when executing the application it worked well but the images didn't show up

      I tried also to put the images and the executable in the same directory but couldn't work also.

      if you know what should I change please tell me !

      Thank you in advance

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @amina

      Did you consider using Qt resources?

      Otherwise you should be able to to remote debug the application from a desktop. This should give you some error messages with a clue what is happening.

      Vote the answer(s) that helped you to solve your issue(s)

      aminaA 1 Reply Last reply
      2
      • aminaA Offline
        aminaA Offline
        amina
        wrote on last edited by
        #3

        Thank you , I didn't know about the Qt resources , I will try it and keep you updated.

        and for the remote debug , I couldn't do it because I cross compiled Qt for a lite version .. even eglfs is not available. when I want to test something I just execute it on the raspberry with the framebuffer linuxfb

        1 Reply Last reply
        0
        • K koahnig

          @amina

          Did you consider using Qt resources?

          Otherwise you should be able to to remote debug the application from a desktop. This should give you some error messages with a clue what is happening.

          aminaA Offline
          aminaA Offline
          amina
          wrote on last edited by amina
          #4

          @koahnig Thank you so much, it works now with the Qt ressources.

          I will post what I did maybe it will help someone!

          so under my test_v1 directory I createad a file image.qrc (I used nano to create it)
          after that in qtcreator I added to my project this file (right click on the project -> add existing files-> choose image.qrc)

          image.qrc containes :

          <!DOCTYPE RCC> <RCC version="1.0">
          <qresource>
              <file>images/b2.png</file>
          </qresource>
           </RCC>
          

          the image b2.png is under test_v1/images

          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