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

Qt 5.9 MonthGrid gets no clicked signal on touch

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.9.0
    • Fix Version/s: 5.9.2
    • Component/s: QtQuick: Controls 2
    • Labels:
      None
    • Environment:

      macOS 10.12.5

      Xcode 8.3.3

      iOS 10.3.2

      Android 6.0.1

      Qt 5.9

      QtCreator 4.3

    • Commits:
      5f09ab8b94ab83e04493940cbd6c95e6d363d0db

      Description

      MonthGrid gets no onClicked() on Qt 5.9

      worked well for 5.8

      workaround: added a MouseArea

      Bug only happens on Android and iOS, macOS clicking with mouse works

      ApplicationWindow {
          visible: true
          width: 640
          height: 480
          title: qsTr("Hello World")
          id: appWindow
      
          Page {
              id: myPage
      
              GridLayout {
                  columns: 3
                  rows: 5
                  width: appWindow.width
                  height: appWindow.height
      
                  MonthGrid {
                      id: monthGrid
                      Layout.fillHeight: true
                      Layout.fillWidth: true
      
                      onClicked: {
                          console.log("tapped on a date ")
                      }
      
                      delegate: Label {
                          id: dayLabel
                          text: model.day
                          font.bold: model.today? true: false
                          opacity: model.month === monthGrid.month ? 1 : 0
                          color: pressed ? Material.foreground : model.today ? Material.accent : Material.foreground
                          minimumPointSize: 8
                          fontSizeMode: Text.Fit
                          horizontalAlignment: Text.AlignHCenter
                          verticalAlignment: Text.AlignVCenter
      
                          background: Rectangle {
                              anchors.centerIn: parent
                              width: Math.min(parent.width, parent.height) * 1.2
                              height: width
                              radius: width / 2
                              color: Material.primary
                              visible: pressed
                          }
      //                    MouseArea {
      //                        anchors.fill: parent
      //                        onClicked: {
      //                            console.log("mouse area click")
      //                        }
      //                    } // mouse
                      } // label in month grid
      
                  } // month grid
              } // grid layout
          } // myPage
      } // app window
      

        Attachments

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

          Activity

            People

            • Assignee:
              jpnurmi J-P Nurmi
              Reporter:
              ekkescorner Ekkehard
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes