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. Qt6.3 QML Calendar Error Composite Singleton Type Calendar is not creatable.
Forum Updated to NodeBB v4.3 + New Features

Qt6.3 QML Calendar Error Composite Singleton Type Calendar is not creatable.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 664 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.
  • O Offline
    O Offline
    OtisLin0523
    wrote on last edited by OtisLin0523
    #1

    I try to use Calendar like doc.
    Version: Qt6.3

    Window {
        width: 640
        height: 480
        visible: true
        title: qsTr("Hello World")
    
        Calendar{
            minimumDate: new Date(2017, 0, 1)
            maximumDate: new Date(2018, 0, 1)
        }
    }
    

    But I got this error: Composite Singleton Type Calendar is not creatable.
    Any one knows how to use it?

    1 Reply Last reply
    0
    • HackSawH Offline
      HackSawH Offline
      HackSaw
      wrote on last edited by
      #2

      Hi @OtisLin0523 I am currently working on Qt6.5 and this is a basic implementation for new calendar module that you can develop in Qt6.x which you can modify as per your requirement.

      ListView {
              id: listview
              width: 150
              height: 150
              snapMode: ListView.SnapOneItem
              orientation: ListView.Horizontal
              highlightRangeMode: ListView.StrictlyEnforceRange
      
              model: CalendarModel {
                  from: new Date(2015, 12, 1)
                  to: new Date(2016, 03, 31)
              }
      
              delegate: ColumnLayout {
      
                  DayOfWeekRow {
                      locale: monthGrid.locale
                      Layout.fillWidth: true
                  }
      
                  MonthGrid {
                      id: monthGrid
                      month: model.month
                      year: model.year
                      locale: Qt.locale("en_AU")
                      Layout.fillWidth: true
                  }
              }
      
              ScrollIndicator.horizontal: ScrollIndicator { }
          }
      
      1 Reply Last reply
      2

      • Login

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