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

Warn about setContextProperty() in documentation

XMLWordPrintable

    • Windows
    • 2050db81c (dev), fdf9c258a (6.6), 028c319d4 (6.5)

      Hi,

      I am using the snippet here 
      https://doc.qt.io/qt-6/qtqml-cppintegration-contextproperties.html#setting-an-object-as-a-context-property

      I get an unqualified access:
      Warning: Main.qml:4:14: Unqualified access
      Text { text: applicationData.getCurrentDateTime() }
                   ^^^^^^^^^^^^^^^

      I would like to understand why. Is is a bug? And if not, why it is expected?

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

            ulherman Ulf Hermann
            pijaouen Pierre Jaouen
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes