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

C++ and CMake support for global QQmlEngine import paths

    XMLWordPrintable

Details

    Description

      If a custom RESOURCE_PREFIX is used for qt_add_qml_module(), then a corresponding call to QQmlEngine::addImportPath() is required in C++.

      Would it be feasible to have CMake generate code to automatically add such custom prefixes to a list of (global) import paths? One possible approach could be:

      • Add a static method, QQmlEngine::addGlobalImportPath(), that can be used to add custom import paths to all engines in a process.
      • Add a CMake option to auto-generate code that calls this function, possibly just before initializing the plugin/resources.

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes