diff --git a/src/private/dquickcontrolpalette.cpp b/src/private/dquickcontrolpalette.cpp index d9b6c628..117bd0af 100644 --- a/src/private/dquickcontrolpalette.cpp +++ b/src/private/dquickcontrolpalette.cpp @@ -861,12 +861,15 @@ void DQuickControlColorSelector::ensureMetaObject() return; m_metaObject = new CustomMetaObject(this); + // TODO setCached will cause builtin property is undefined firstly in qml. +#if QT_VERSION <= QT_VERSION_CHECK(6, 8, 0) // Must true, see CustomMetaObject::createProperty m_metaObject->setCached(true); QQmlData *qmldata = QQmlData::get(this); Q_ASSERT(qmldata); // the cache object is from QQmlOpenMetaObjectTypePrivate m_propertyCache = qmldata->propertyCache; +#endif } int DQuickControlColorSelector::indexOfPalette(const QByteArray &name) const