Details
Description
consider the following QML code:
import QtQuick.Templates 2.15 as T
T.Control {}
Since sometime between 6.2 and 6.5 this crashes with the following assert:
ASSERT: "accessibleAttached" in file /home/qt/qt6dev-src/qtdeclarative/src/quicktemplates/qquickcontrol.cpp, line 2163
The code in question looks like this:
void QQuickControl::accessibilityActiveChanged(bool active) { Q_D(QQuickControl); if (!active) return; QQuickAccessibleAttached *accessibleAttached = qobject_cast<QQuickAccessibleAttached *>(qmlAttachedPropertiesObject<QQuickAccessibleAttached>(this, true)); Q_ASSERT(accessibleAttached); accessibleAttached->setRole(d->effectiveAccessibleRole()); }
This doesn't work if the QQuickAccessibleAttached type is not QML-registered, that is if you haven't imported QtQuick in some way or other.
Attachments
Issue Links
- relates to
-
QTBUG-122321 qmltc: WebEngineView with anchors causes assertion at component creation
-
- Closed
-