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

Consider creating a qt.conf file in the build dir of an app when using a static relocatable Qt

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Open
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 6.2.4, 6.3.0
    • Fix Version/s: None
    • Labels:
      None

      Description

      Currently the relocatable feature is disabled by default when configuring a static Qt.

      When enabled, that means that running applications from the build directory will not find qt provided translations and qml modules.

      See
      https://codereview.qt-project.org/c/qt/qtbase/+/210936/30#message-f3fd1bac43f08fe924fb3a0307942e43781e779c
      and
      https://codereview.qt-project.org/c/qt/qtbase/+/210936/30#message-82c9151682f5ed1baf6132569687009692378f60

      What we could consider doing is creating a qt.conf inside the app build dir.
      It would be created by a qt_add_executable() CMake call.
      The qt.conf would have translations and qml imports entries, as absolute paths pointing to the Qt installation dir.
      We would only do it for static + relocatable case, to reduce potential breakage.

      We should ensure that the qt.conf is not installed. We should also provide an opt-out, which would be useful in case if the project already creates a qt.conf file.

      Creating the qt.conf automatically will be a small breakage for projects that already create it themselves, but the scope is hopefully rather small (static + relocatable).

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              qtbuildsystem Qt Build System Team
              Reporter:
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes