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

QML best practices docs are outdated

    XMLWordPrintable

Details

    • b262090c0226589282c377fe531cd3a1e713c729 (qt/qtdeclarative/dev) 7bf995971b6804e55da2fd04c987798f5402ff54 (qt/qtdeclarative/6.2)

    Description

      https://doc-snapshots.qt.io/qt6-6.2/qtquick-bestpractices.html mentions

      • "Bundle Application Resources": This should be "Create QML modules" instead. Bundling resources is not enough. You need to tell the build system that your files constitute a QML module so that they are properly analyzed and compiled. Also, the whole section focuses on qmake. Instead, CMake should be the primary build system. Building QML modules with qmake can be covered in a separate section further down, if necessary at all.
      • "Separate UI from Logic": While this generally heads into the right direction, we should not promote the use of ListModel and ListElement because ListElement relies on custom parsers. Instead we should either restrict it to simple models (integer or JS array) or go the whole way and use a QAbstractItemModel.

      https://doc-snapshots.qt.io/qt6-6.2/qml-codingconventions.html should mention that JS functions need to be type-annotated.

      Attachments

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

        Activity

          People

            max.goldstein Maximilian Goldstein
            ulherman Ulf Hermann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes