Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Calendar QML Type onClicked(date) returns wrong date
Forum Updated to NodeBB v4.3 + New Features

Calendar QML Type onClicked(date) returns wrong date

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
5 Posts 2 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    halil sogut68
    wrote on last edited by
    #1

    Hi,
    In qt versions 5.8 and 5.9, the calendar works fine for all versions of android, while in qt version 5.7 it only works properly in android 5 version. Is this a bug of QT ? My Qt version is 5.7 and I would like to run my application on all versions of android. How can you help me ?

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      Tried with Qt 5.7 & Android 6. Date is coming properly. What is the wrong date it is giving ? Can u share you code snippet ?

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      2
      • H Offline
        H Offline
        halil sogut68
        wrote on last edited by
        #3

        import QtQuick 2.6
        import QtQuick.Controls 1.2
        Rectangle {
        property alias mouseArea: mouseArea
        property alias textEdit: textEdit

        width: 360
        height: 360
        
        MouseArea {
            id: mouseArea
            anchors.fill: parent
        }
        
        TextEdit {
            id: textEdit
            text: qsTr("Enter some text...")
            verticalAlignment: Text.AlignVCenter
            anchors.top: parent.top
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.topMargin: 20
            Rectangle {
                anchors.fill: parent
                anchors.margins: -10
                color: "transparent"
                border.width: 1
            }
        }
        Calendar{
        
        }
        

        }
        As I understand from Code, I used the tool of QT directly. I will give you some more details about the error. From September 2016 to 1985, you look at the history of the year before the year of January each year in January. I hope it's explanatory enough. Thanks dheerendra

        1 Reply Last reply
        0
        • dheerendraD Offline
          dheerendraD Offline
          dheerendra
          Qt Champions 2022
          wrote on last edited by
          #4

          Tried with code like the follows. Tried to get the dates 2013 till 2017. I did not get anything wrong. I tried with Qt 5.7 and Android version 6.x. It works.
          Can you help with the output u r getting & what is the wrong with it.

          Window {
              visible: true
              width: 640
              height: 480
              title: qsTr("Hello World")
              Calendar{
                  id : cal
              }
          
          Connections{
              target: cal
              onClicked : {
                  console.log(date)
              }
          }
          

          }

          Dheerendra
          @Community Service
          Certified Qt Specialist
          http://www.pthinks.com

          1 Reply Last reply
          1
          • H Offline
            H Offline
            halil sogut68
            wrote on last edited by
            #5

            The consol output shows wrong (a month before) between the dates I said .

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved