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

Documentation of the QML singleton: correct the snippet for pragma Singleton

    XMLWordPrintable

Details

    • Windows
    • f4fc10172 (dev), 5911f307e (6.7)
    • DaVinci 97

    Description

      Thanks for creating https://doc.qt.io/qt-6/qml-singleton.html this was really something missing .

      I noticed though that the https://doc.qt.io/qt-6/qml-singleton.html#defining-singletons-in-qml says that we need to write

      pragma singleton

      I think it should be:

      pragma Singleton

      Not writing singleton with a capital S leads to a compile error error:
      Error compiling qml file: C:/work/Qt/SingletonForFonts/Globals.qml:1:1: error: Unknown pragma 'singleton'

      Attachments

        Issue Links

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

          Activity

            People

              andreas.eliasson Andreas Eliasson
              pijaouen Pierre Jaouen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes