Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-113397

"Explicit Loading and Unloading of Embedded Resources" needs elaboration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.0
    • None
    • All

    Description

      https://doc.qt.io/qt-6/resources.html#explicit-loading-and-unloading-of-embedded-resources

      This section can possibly confuse the readers such as:

      1. Given in the code snippet, Q_INIT_RESOURCE() is called in a user-defined class, should we call Q_INIT_RESOURCE() everytime we want to access particular resources, such as .png files?
      2. If so, doesn't it lead to so many Q_INIT_RESOURCE() calls? -> less maintenability
      3. Also, doesn't it lead to the situation where the developers need to put related resource files such as .png files into separate .qrc files just to make sure they can be used as an argument for Q_INIT_RESOURCE() in many different places without overwrapping eath other? -> more effort and less maintenability
      4. Can we just call Q_INITI_RESOURCE() in one place and that's it? if so, where is it? <-- hopefully, showing this with an example in the doc is the best.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes