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

Warnings when using DialogButtonBox

    XMLWordPrintable

Details

    • d19f782a887e4a8c87ceee42ad8405a0b12388d0 (qt/qtquickcontrols2/5.12)

    Description

      import QtQuick 2.9
      import QtQuick.Window 2.2
      import QtQuick.Controls 2.3
      
      Window {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
      
          Dialog {
              id: discardChangesDialog
              objectName: "discardChangesDialog"
              x: Math.round(parent.width - width) / 2
              y: Math.round(parent.height - height) / 2
              title: qsTr("Unsaved changes")
              modal: true
      
              Label {
                  text: qsTr("The action you're about to perform could discard changes.\n\nContinue anyway?")
              }
      
              // Using a DialogButtonBox allows us to assign objectNames to the buttons,
              // which makes it possible to test them.
              footer: DialogButtonBox {
                  Button {
                      objectName: "saveChangesDialogButton"
                      text: qsTr("Save")
                      DialogButtonBox.buttonRole: DialogButtonBox.AcceptRole
                  }
                  Button {
                      objectName: "discardChangesDialogButton"
                      text: qsTr("Discard")
                      DialogButtonBox.buttonRole: DialogButtonBox.DestructiveRole
                  }
              }
          }
      }
      
      14:20:16: Starting /home/mitch/dev/temp/untitled4-qt5_dev_debug-Debug/untitled4...
      QML debugging is enabled. Only use this in a safe environment.
      Previously registered enum will be overwritten due to name clash: QQuickDialogButtonBox.UnknownLayout
      Previously registered enum will be overwritten due to name clash: QQuickDialogButtonBox.WinLayout
      Previously registered enum will be overwritten due to name clash: QQuickDialogButtonBox.MacLayout
      Previously registered enum will be overwritten due to name clash: QQuickDialogButtonBox.KdeLayout
      Previously registered enum will be overwritten due to name clash: QQuickDialogButtonBox.GnomeLayout
      Previously registered enum will be overwritten due to name clash: QQuickDialogButtonBox.MacModelessLayout
      Previously registered enum will be overwritten due to name clash: QQuickDialogButtonBox.AndroidLayout
      14:20:18: /home/mitch/dev/temp/untitled4-qt5_dev_debug-Debug/untitled4 exited with code 0
      

      Attachments

        For Gerrit Dashboard: QTBUG-70141
        # Subject Branch Project Status CR V

        Activity

          People

            mitch_curtis Mitch Curtis
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes