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

Error when refferencing to MessageDialog buttons

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.8.0
    • Quick: Dialogs
    • None
    • iOS/tvOS/watchOS, macOS

    Description

      QtQuick.Dialogs was imported. Source code to declare the dialog:

      MessageDialog {
          id: messageDialog
          text: "Some text"
          informativeText: "Bit more text"
          buttons: MessageDialog.Ok | MessageDialog.Cancel
      } 

      It causes the following runtime error:

      qrc:/DraftQML/main.qml:16: TypeError: Cannot read property 'Ok' of undefined

      I don't face this issue when using Qt 6.7.3.

      I also get the following warning because of importing QtQuick and QtQuick.Dialogs (which I don't have when using Qt 6.7.3).

      warning: Ambiguous type detected. FolderDialog 6.0 is defined multiple times. [import] 

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            armanprestige Arman
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes