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. Resources not found (Cross compiling)

Resources not found (Cross compiling)

Scheduled Pinned Locked Moved Solved Mobile and Embedded
5 Posts 3 Posters 641 Views
  • 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.
  • D Offline
    D Offline
    dtrit
    wrote on last edited by
    #1

    Hi all,

    I have run into a problem with the QT resource system. I have a .qrc with a single .png file that appears to work perfectly fine on the IDE side (found in the project files and used in the UI editor) but the image does not display on the remote host that runs the program. The file is in my .pro file and I have checked build directories/build output to make sure the qrc file is being parsed and compiled (qrc_assets.o). I have also added a small qDebug output for iterating over ":" and the path/file are simply not there.

    Some screenshots:
    75ff0867-52f6-4a4f-a528-092cecc479c2-image.png
    4a8bdfc1-08e5-450c-81a9-5c523555c36c-image.png

        QDirIterator it(":", QDirIterator::Subdirectories);
        while (it.hasNext()) {
            if(it.next().contains("qt-project.org") != true)
            {
                qDebug() << it.next();
            }
        }
    

    Output:
    1314d958-4c9d-4b8c-b999-33f1c413ba74-image.png

    Some background: I am cross compiling using linaro-toolchain v7.5 and and running on the remote host over SSH. So far everything else has been smooth sailing.

    As a quick test I tried using absolute path to the same png file and it worked.

    ui->label->setPixmap(QPixmap("/home/debian/run/VatCtrl/bin/cog-icon.png"));
    

    Ideally I would like to avoid having to do this.

    Any pointers for sorting this out would be great.

    Thanks in advance

    raven-worxR 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Might be a silly question but is it working properly on your desktop machine ? You explained that everything is good IDE wise but did not say if it executes properly.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D dtrit

        Hi all,

        I have run into a problem with the QT resource system. I have a .qrc with a single .png file that appears to work perfectly fine on the IDE side (found in the project files and used in the UI editor) but the image does not display on the remote host that runs the program. The file is in my .pro file and I have checked build directories/build output to make sure the qrc file is being parsed and compiled (qrc_assets.o). I have also added a small qDebug output for iterating over ":" and the path/file are simply not there.

        Some screenshots:
        75ff0867-52f6-4a4f-a528-092cecc479c2-image.png
        4a8bdfc1-08e5-450c-81a9-5c523555c36c-image.png

            QDirIterator it(":", QDirIterator::Subdirectories);
            while (it.hasNext()) {
                if(it.next().contains("qt-project.org") != true)
                {
                    qDebug() << it.next();
                }
            }
        

        Output:
        1314d958-4c9d-4b8c-b999-33f1c413ba74-image.png

        Some background: I am cross compiling using linaro-toolchain v7.5 and and running on the remote host over SSH. So far everything else has been smooth sailing.

        As a quick test I tried using absolute path to the same png file and it worked.

        ui->label->setPixmap(QPixmap("/home/debian/run/VatCtrl/bin/cog-icon.png"));
        

        Ideally I would like to avoid having to do this.

        Any pointers for sorting this out would be great.

        Thanks in advance

        raven-worxR Offline
        raven-worxR Offline
        raven-worx
        Moderators
        wrote on last edited by
        #3

        @dtrit
        some silly questions also from my side:
        what is the type of the host platform where it is working? Is it windows? If so check the case-sensitivity of the file paths, since this doesn't matter for rcc on Windows side.
        Also make sure to rerun qmake, to update the makefile and ensuring that rcc is invoked again with the new file list.

        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
        If you have a question please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dtrit
          wrote on last edited by
          #4

          thanks for the response.

          So I am running linux mint on a virtual machine. I have not installed a desktop kit to test it on the build machine - which I will setup ASAP.

          My QT versions were mismatched - cross compiling in the virtual machine on QT5.15.2 and the beaglebone was using the debian supplied 5.11.3. I am currently in the process of building 5.15.2 on the beaglebone natively. - I believe this mismatch resulted in incompatible QSocketNotifier libs also.

          Will report back if this fixes the issue or not.

          1 Reply Last reply
          1
          • D Offline
            D Offline
            dtrit
            wrote on last edited by
            #5

            Have Built QT 5.15.2 for the target hardware. Resources now working correctly. closing issue as it was my own fault mismatching versions.

            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