Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.8.0 Beta2
-
89385db92 (dev), 46df9e537 (6.8)
Description
https://doc.qt.io/qt-6/qtquickcontrols2-customize.html instructs users to copy $QTDIR/qml/QtQuick/Controls/Basic/Button.qml to customize Button. The attached project does so, and tries to use Direct Mode (https://doc.qt.io/qt-6/qtqml-qml-script-compiler.html#direct-mode )
The project builds and runs fine with Qt 6.7, but fails with Qt 6.8.0-beta2:
/Users/USER/Projects/IconLabelIssue/build/Qt_6_8_0_for_macOS-Debug/.rcc/qmlcache/appIconLabelIssue_MyButton_qml.cpp:2013:39: error: use of undeclared identifier 'QQuickIconLabel' argTypes[0] = QMetaType::fromType<QQuickIconLabel::Display>(); ^ /Users/USER/Projects/IconLabelIssue/build/Qt_6_8_0_for_macOS-Debug/.rcc/qmlcache/appIconLabelIssue_MyButton_qml.cpp:2034:54: error: use of undeclared identifier 'QQuickIconLabel' const QMetaType returnType = QMetaType::fromType<QQuickIconLabel::Display>(); ^ /Users/USER/Projects/IconLabelIssue/build/Qt_6_8_0_for_macOS-Debug/.rcc/qmlcache/appIconLabelIssue_MyButton_qml.cpp:2059:54: error: use of undeclared identifier 'QQuickIconLabel' const QMetaType returnType = QMetaType::fromType<QQuickIconLabel::Display>(); ^
This occurs because the generated C++ code refers to QQuickIconLabel but does not add #include <private/qquickiconlabel_p.h>