<div dir="ltr"><div>Hi,</div><div><br></div><div>for GCompris (compiled in Qt5 only), we have activities using the Calendar qml object.</div><div><br></div><div>Previously, we imported the one from QtQuick.Controls 1 but this module has been deprecated and we switched to 
QtQuick.Controls 2. This component hasn't been implemented in QtQuick.Controls 2 before Qt6.3 (via "import QtQuick.Controls").</div><div><br></div><div>

</div><div>This one is available in Qt Marketplace (<a href="https://code.qt.io/cgit/qt-extensions/qtquickcalendar.git">https://code.qt.io/cgit/qt-extensions/qtquickcalendar.git</a>) and supports Qt5 and Qt 6.0-> 6.2 
(via "import QtQuick.Calendar 1.0")  but requires QtControls private headers to be installed and they are not present on some distributions (Ubuntu < 21.04...), which we would like to still support for the next version.</div><div><br></div><div>There is the one in Qt.labs which is available in Qt5 but not Qt6 (via "import Qt.labs.calendar 1.0").</div><div><br></div><div>GCompris' code works fine with any of the import (<a href="https://invent.kde.org/education/gcompris/-/blob/master/src/activities/calendar/Calendar.qml#L14">https://invent.kde.org/education/gcompris/-/blob/master/src/activities/calendar/Calendar.qml#L14</a>) but I didn't find any "if(Qt_version < ...) use one, else the other" except doing a Calendar.qml.cmake with a @GOOD_IMPORT@ that would be set by cmake and a configure_file.</div><div>Is there a better way?</div><div><br></div><div>For now,  we only target Qt5, so we could use Qt.labs without having to handle the other two but once we switch to Qt6, we will face the issue with distributions using Qt6.2 so I'd rather prepare this transition sooner than later.<br></div><div><br></div><div>Cheers,</div><div><br></div><div>Johnny<br></div></div>