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

Have the ability to enable type compiler for single specific file

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • 6.9
    • 6.5
    • QML: Compiler
    • None
    • All

    Description

      In Qt 6.4, the qml type compiler could be enabled for a specific file using `qt6_target_compile_qml_to_cpp`.

      However, in Qt 6.5, the only method to enable the type compiler is to apply it to the entire module using `qt_add_qml_module`.

      The issue arises because, in most cases, it is challenging to ensure that all QML files within a module are type compiler-friendly. Therefore, it would be beneficial to have the capability to enable the type compiler for an individual file, like this:

      ```cmake
      set_source_files_properties(MyQmlFile.qml PROPERTIES ENABLE_TYPE_COMPILER TRUE)
      ```

      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
            romain.donze Romain Donzé
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes