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
-
For Gerrit Dashboard: QTBUG-128895 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
590872,1 | QtQml: Auto-register types of dependencies when registering modules | dev | qt/qtdeclarative | Status: ABANDONED | -1 | 0 |
592138,8 | QtQml: Allow creating attachments from unregistered types | dev | qt/qtdeclarative | Status: MERGED | +2 | +1 |
596487,2 | QtQml: Allow creating attachments from unregistered types | 6.8 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
596714,3 | QtQml: Allow creating attachments from unregistered types | tqtc/lts-6.5 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |