XMLWordPrintable

Details

    • framework-content 2, framework-content 3

    Description

      A case study: the "Qt Quick Controls - Flat Style" example (https://doc.qt.io/qt-6/qtquickcontrols-flatstyle-example.html )

      Although https://codereview.qt-project.org/c/qt/qtdeclarative/+/573813 effectively applies QTP0004, this example doesn't actually make use of QTP0004. Rather, it still provides manually-written qmldir files, which we want to discourage.

       

      Suggestion: Update our examples to make use of our automatic qmldir generation functionality

      For our case study
      We need to remove the manually-written qmldir files from the CMakeLists.txt file, and then add the following line:

      set_source_files_properties("imports/Theme/Theme.qml" PROPERTIES
          QT_QML_SINGLETON_TYPE TRUE
      )
      

      This lets the project build and run with auto-generated qmldir files.

      We could go a step further and add CMakeLists.txt files + qt_add_qml_module() to imports/Flat/ and imports/Theme/, so that we don't need to rely on QTP0004.

       

      For our examples in general

      A quick grep of C:\Qt\Examples\Qt-6.8.1 reveals almost 100 manually-written qmldir files. It would be nice to not need them (at least for CMake projects)

      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:

              Gerrit Reviews

                There are no open Gerrit changes