Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. What I'm doing wrong with "BASE" in qt6_add_resources
Forum Updated to NodeBB v4.3 + New Features

What I'm doing wrong with "BASE" in qt6_add_resources

Scheduled Pinned Locked Moved Solved Qt 6
3 Posts 2 Posters 482 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.
  • K Offline
    K Offline
    Krulle
    wrote on last edited by
    #1

    Hello,

    I have a problem with the parameter "BASE" in qt6_add_resources.
    Whenever I specify this parameter, it gives an error message "ABSOLUTEPATH OF BASE is a directory but a file was expected."

    set (RESOURCES_IMAGES
        images/flame.png
        images/kettle.png
        images/kettleStir1.png
        images/kettleStir2.png
        images/kettleStir3.png
    )
    
    qt6_add_resources(
        TestApp "images"
        BASE "misc"
        FILES ${RESOURCES_IMAGES}
    )
    

    The files are located under: "WORKING_DIR/misc/images/xxx.png".

    If I remove the parameter "BASE", the error message disappears.
    Why is this and what am I doing wrong?

    Thanks a lot.

    Christian EhrlicherC 1 Reply Last reply
    0
    • K Krulle

      Hello,

      I have a problem with the parameter "BASE" in qt6_add_resources.
      Whenever I specify this parameter, it gives an error message "ABSOLUTEPATH OF BASE is a directory but a file was expected."

      set (RESOURCES_IMAGES
          images/flame.png
          images/kettle.png
          images/kettleStir1.png
          images/kettleStir2.png
          images/kettleStir3.png
      )
      
      qt6_add_resources(
          TestApp "images"
          BASE "misc"
          FILES ${RESOURCES_IMAGES}
      )
      

      The files are located under: "WORKING_DIR/misc/images/xxx.png".

      If I remove the parameter "BASE", the error message disappears.
      Why is this and what am I doing wrong?

      Thanks a lot.

      Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Krulle said in What I'm doing wrong with "BASE" in qt6_add_resources:

      The files are located under: "WORKING_DIR/misc/images/xxx.png".

      "BASE is a path prefix that denotes the root point of the file's alias. For example, if BASE is "assets" and FILES is "assets/images/logo.png", then the alias of that file is "images/logo.png"."

      Nothing on your disk, it affects the location in the resource file.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      K 1 Reply Last reply
      2
      • Christian EhrlicherC Christian Ehrlicher

        @Krulle said in What I'm doing wrong with "BASE" in qt6_add_resources:

        The files are located under: "WORKING_DIR/misc/images/xxx.png".

        "BASE is a path prefix that denotes the root point of the file's alias. For example, if BASE is "assets" and FILES is "assets/images/logo.png", then the alias of that file is "images/logo.png"."

        Nothing on your disk, it affects the location in the resource file.

        K Offline
        K Offline
        Krulle
        wrote on last edited by
        #3

        @Christian-Ehrlicher said in What I'm doing wrong with "BASE" in qt6_add_resources:

        Nothing on your disk, it affects the location in the resource file.

        Oh crap.
        All right, that's an important hint that I now understand.
        Thank you very much!

        1 Reply Last reply
        2
        • K Krulle has marked this topic as solved on

        • Login

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