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

qmlsc mistakes Enum for Property

    XMLWordPrintable

Details

    • 595603581 (dev), 6c667ddc9 (6.5), 6937f2e50 (dev), c1d64e221 (6.5), 82cda7129 (dev), 5001df10a (6.4), 136789182 (6.5), 5d5e41ed7 (tqtc/lts-6.2)

    Description

      Code

      import QtQuick.Controls.Basic
      
      ApplicationWindow {
          id: root
          width: 400
          height: 300
          visible: true
      
          footer: DialogButtonBox {
              standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
      
              onAccepted: root.color = "green"
              onRejected: root.color = "red"
          }
      }
      

      Compilation warning and error

      Warning: main.qml:10:42: Property "Ok" not found on type "DialogButtonBox"
              standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
                                               ^^
      Error: main.qml:10:42: Could not compile binding for standardButtons: Cannot load property Ok from QQuickDialogButtonBoxAttached of QQuickDialogButtonBoxAttached.
              standardButtons: DialogButtonBox.Ok | DialogButtonBox.Cancel
                                               ^^
      

      Attachments

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

        Activity

          People

            ulherman Ulf Hermann
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: