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

Qt 5.9 MonthGrid gets no clicked signal on touch

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.9.0
    • Quick: Controls 2
    • None
    • macOS 10.12.5

      Xcode 8.3.3

      iOS 10.3.2

      Android 6.0.1

      Qt 5.9

      QtCreator 4.3
    • 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

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

        Activity

          People

            Unassigned Unassigned
            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