Details
-
Bug
-
Resolution: Cannot Reproduce
-
P1: Critical
-
6.1
Description
I get the following error from https://codereview.qt-project.org/c/qt/qtquickcontrols2/+/318565/20/src/imports/controls/basic/FileDialog.qml#129:
qrc:/main.qml:13:5: Type FileDialog unavailable file:///media/dev2/qt-dev-debug/qtbase/qml/QtQuick/Controls/Basic/FileDialog.qml:129:17: "FileDialogDelegate.icon" is not available in QtQuick.Controls.impl 255.255.
when running this QML (with QCoreApplication::setAttribute(Qt::AA_DontUseNativeDialogs) in main()):
import QtQuick import QtQuick.Controls import QtQuick.Dialogs ApplicationWindow { visible: true width: 640 height: 480 FileDialog { title: "FileDialog" visible: true } }
I tried adding a foreign declaration for it, but it didn't help:
diff --git a/src/quickcontrols2impl/qtquickcontrols2foreign_p.h b/src/quickcontrols2impl/qtquickcontrols2foreign_p.h index 6285e43c5..950d19adc 100644 --- a/src/quickcontrols2impl/qtquickcontrols2foreign_p.h +++ b/src/quickcontrols2impl/qtquickcontrols2foreign_p.h @@ -35,6 +35,7 @@ ****************************************************************************/ #include <QtQml/qqml.h> +#include <QtQuickTemplates2/private/qquickicon_p.h> #include <QtQuickTemplates2/private/qquickoverlay_p.h> #include <QtQuickTemplates2/private/qquicksplitview_p.h> @@ -73,4 +74,12 @@ struct QQuickSplitHandleAttachedForeign QML_ADDED_IN_VERSION(2, 13) }; +struct QQuickIconForeign +{ + Q_GADGET + QML_ANONYMOUS + QML_FOREIGN(QQuickIcon) + QML_ADDED_IN_VERSION(2, 3) +}; + QT_END_NAMESPACE
FileDialogDelegate is declared here: https://codereview.qt-project.org/c/qt/qtquickcontrols2/+/318565/20/src/quickcontrols2impl/qquickfiledialogdelegate_p.h#59
Attachments
Issue Links
- is required for
-
QTBUG-87797 Implement non-native FileDialog
- Closed
- relates to
-
QTBUG-88245 ReferenceError: implicitIndicatorHeight is not defined
- Closed
- resulted in
-
QTBUG-90521 Revisioned properties of parent classes from different modules are inaccessible
- Closed