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

Buttons with Actions assigned overwrite any 'enabled' bindings on the Button

    XMLWordPrintable

Details

    Description

      I would expect the two buttons below to behave identically. Instead, the one with the Action assigned stays enabled when the mouse is in the window.

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      
      MouseArea {
        id: root
        hoverEnabled: true
        Action {
          id: action
          onTriggered: console.warn('action')
          text: 'Foo'
        }
      
        Column {
          Button {
            enabled: !root.containsMouse
            text: 'No Action'
          }
      
          Button {
            enabled: !root.containsMouse
            text: 'Action'
            action: action
          }
        }
      }
      

      Attachments

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            jfaust Josh Faust
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes