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. Error trying to compile .qrc file in Resources Folder

Error trying to compile .qrc file in Resources Folder

Scheduled Pinned Locked Moved Solved General and Desktop
qrcjpgerror 1
5 Posts 2 Posters 1.5k 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.
  • A Offline
    A Offline
    AngoMango
    wrote on last edited by AngoMango
    #1

    I'm receiving an error saying:

    [qrc_Resources_Files.cpp] Error 1
    

    I suspect it has something to do with my compiler not recognizing the jpg images in my Resource folder.

    errorQRC.png

    The file error window is what I get when I try to open any of the jpg files.

    This prevents me from compiling and running.

    JKSHJ 1 Reply Last reply
    0
    • A AngoMango

      I'm receiving an error saying:

      [qrc_Resources_Files.cpp] Error 1
      

      I suspect it has something to do with my compiler not recognizing the jpg images in my Resource folder.

      errorQRC.png

      The file error window is what I get when I try to open any of the jpg files.

      This prevents me from compiling and running.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by JKSH
      #2

      @AngoMango said in Error trying to compile .qrc file in Resources Folder:

      The file error window is what I get when I try to open any of the jpg files.

      The error message says that it was unable to read the bytes of the files, possibly because you don't have permission to open them. It's not about JPEG support.

      From your console,

      1. cd to "/home/angaar/CS1D/GoBigOGoHome/CS1D-Project-1-Go-Big-O-Go-Home--master/College Images/"
      2. Call ls -l

      What do you see? Who is the owner of those image files? What permissions are set in those files?

      Next, try to open the files in an image viewer. Does it load correctly?

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      A 1 Reply Last reply
      2
      • JKSHJ JKSH

        @AngoMango said in Error trying to compile .qrc file in Resources Folder:

        The file error window is what I get when I try to open any of the jpg files.

        The error message says that it was unable to read the bytes of the files, possibly because you don't have permission to open them. It's not about JPEG support.

        From your console,

        1. cd to "/home/angaar/CS1D/GoBigOGoHome/CS1D-Project-1-Go-Big-O-Go-Home--master/College Images/"
        2. Call ls -l

        What do you see? Who is the owner of those image files? What permissions are set in those files?

        Next, try to open the files in an image viewer. Does it load correctly?

        A Offline
        A Offline
        AngoMango
        wrote on last edited by AngoMango
        #3

        @JKSH /College Images is built-in, so I don't have the folder outside of the project. The only way to view the list files would be from QT. I don't think this should be a problem, because this has been tried by other people and they were able to view the images and run the program without the error just fine.

        Also the image viewer gives the same File Error window.

        This was taken straight from a github repository. So could the ownership of the images be the error? Should I do 'Add New Existing Files' in the Resources folder and just re-add the Resource_Files.qrc file?

        JKSHJ 1 Reply Last reply
        0
        • A AngoMango

          @JKSH /College Images is built-in, so I don't have the folder outside of the project. The only way to view the list files would be from QT. I don't think this should be a problem, because this has been tried by other people and they were able to view the images and run the program without the error just fine.

          Also the image viewer gives the same File Error window.

          This was taken straight from a github repository. So could the ownership of the images be the error? Should I do 'Add New Existing Files' in the Resources folder and just re-add the Resource_Files.qrc file?

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by JKSH
          #4

          @AngoMango said in Error trying to compile .qrc file in Resources Folder:

          /College Images is built-in, so I don't have the folder outside of the project. The only way to view the list files would be from QT.

          The image files must still exist on your computer somewhere. Just cd to the project folder that contains those images.

          If you can't find the files, that means you've found the problem: The files can't be opened because they don't exist!

          Also the image viewer gives the same File Error window.

          That means the problem is outside of Qt.

          If the files are missing, then delete your project folder and re-clone the Git repo.

          If the files are there but the permissions are wrong, then use a tool like chown to change ownership of those files: https://linuxize.com/post/linux-chown-command/

          this has been tried by other people and they were able to view the images and run the program without the error just fine.

          Look at their project folder (using a Linux file browser or the console). See if you can spot any differences between your copy and their copy.

          Should I do 'Add New Existing Files' in the Resources folder and just re-add the Resource_Files.qrc file?

          No, that won't cause missing files to magically appear, and it won't fix file ownership/permissions.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          A 1 Reply Last reply
          2
          • JKSHJ JKSH

            @AngoMango said in Error trying to compile .qrc file in Resources Folder:

            /College Images is built-in, so I don't have the folder outside of the project. The only way to view the list files would be from QT.

            The image files must still exist on your computer somewhere. Just cd to the project folder that contains those images.

            If you can't find the files, that means you've found the problem: The files can't be opened because they don't exist!

            Also the image viewer gives the same File Error window.

            That means the problem is outside of Qt.

            If the files are missing, then delete your project folder and re-clone the Git repo.

            If the files are there but the permissions are wrong, then use a tool like chown to change ownership of those files: https://linuxize.com/post/linux-chown-command/

            this has been tried by other people and they were able to view the images and run the program without the error just fine.

            Look at their project folder (using a Linux file browser or the console). See if you can spot any differences between your copy and their copy.

            Should I do 'Add New Existing Files' in the Resources folder and just re-add the Resource_Files.qrc file?

            No, that won't cause missing files to magically appear, and it won't fix file ownership/permissions.

            A Offline
            A Offline
            AngoMango
            wrote on last edited by
            #5

            @JKSH The branch I've been copying from didn't include some of the folders that were present in the 'Resources' section. Shouldn't have taken me this long to figure it out. Thank you.

            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