title: QML- Right Click Not Detected in MouseArea
body: <p>I'm working on an image editor and specifically working on setting the current left or right button's associated color using a MouseArea (inside a Button type). The problem I'm having is that I can't seem to filter for particular buttons at all. Here's the snippet giving me trouble:</p>
  
  <pre><code>    Button {
          x: 60
          width: 80
          height: 40
          text: "Blue"
  
          anchors.verticalCenter: parent.verticalCenter
  
          onButtonClick: {
              if(mouseArea.pressedButtons &amp; Qt.RightButton) {
                  console.log("Right button used");
                  GlobalState.setRightColorValues(0.0, 0.0, 1.0, 1.0);
              } else {
                  console.log("Left button used");
                  GlobalState.setLeftColorValues(0.0, 0.0, 1.0, 1.0);
              }
          }
      }
  </code></pre>
  
  <p>(If needed I can provide the entirety of Button.qml, but it's mostly from <a href="https://qt-project.org/doc/qt-5.0/qtdoc/gettingstartedqml.html" rel="noreferrer">here</a>).</p>
  
  <p>I'm trying to follow the example <a href="http://qt-project.org/doc/qt-5.0/qtquick/qml-qtquick2-mousearea.html" rel="noreferrer">here</a>, but the method used to filter for right mouse clicks doesn't seem to work (anymore, anyway). What happens is the statement "defaults" to assuming a left click. I've also tried separating the two into different if-statements, but doing so causes <em>no</em> buttons to be filtered explicitly.</p>
  
  <p>What needs to be changed in order to filter for specific mouse buttons? Or will I have to implement the sort of "switch primary color" button used in Paint/Paint.NET?</p>
  
  <p>Edit 1: I've realized that there was a relevant snippet missing from Button.qml-</p>
  
  <pre><code> MouseArea{
      id: buttonMouseArea;
  
      acceptedButtons: Qt.AllButtons;
      hoverEnabled: true
  
      onEntered: parent.color = onHoverColor
      onExited:  parent.color = buttonColor
  
      anchors.fill: parent;
  
      onClicked: buttonClick();
  }
  </code></pre>
  
  <p>This is nested inside a <code>Rectangle</code>, which also holds a <code>Text</code> field.</p>