Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-127469

[Reg 6.7 -> 6.8.0b2] IconLabel fails to compile with qmlsc Direct Mode

    XMLWordPrintable

Details

    • 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>

      Attachments

        1. IconLabelIssue.zip
          2 kB
          Sze Howe Koh
        For Gerrit Dashboard: QTBUG-127469
        # Subject Branch Project Status CR V

        Activity

          People

            olivier.decanniere Olivier De Cannière
            skoh-qt Sze Howe Koh
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes