Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What is rccData in registerResource(const uchar * rccData
Qt 6.12 LTS is out! See what's new in the release blog

What is rccData in registerResource(const uchar * rccData

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.5k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1
    1. What goes in rccData ? The name of the file ? it's contents ?
    2. Is this the right way to add data/files to a a :/ location during runtime ?

    bool QResource::registerResource(const uchar * rccData, const QString & mapRoot = QString()) [static]

    Thanks.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      If I understand the documentation correctly, rccData references a memory area that contains the binary resource data. The memory must not be freed untill the last reference on the resource is away.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        i tried pointing at any of these

        static const unsigned char qt_resource_data[]
        static const unsigned char qt_resource_name[]
        static const unsigned char qt_resource_struct[]

        but it always returned false, e.g. registerResource(qt_resource_struct,"/a.txt");

        This is really lacking some examples.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          twsimpson
          wrote on last edited by
          #4

          It seems to expect data in the same format as rcc outputs with the -binary switch

          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
          • Unsolved