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

Overlay is not available when hardcoding the style

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.5.0, 6.6.0
    • 6.4.0 Beta1
    • Quick: Controls 2
    • None
    • All
    • 4cbc25f37 (dev), 8f68df62b (6.5), e9f53d023 (dev)

    Description

      If I go by Ulf's blog posts and the QQC2 docs, this simple example (just an extended QtCreator template app) should work fine: see the attached main.qml. I do however get a runtime error:

      qrc:/addqmltest/main.qml:20: ReferenceError: Overlay is not defined
      qrc:/addqmltest/main.qml:19: ReferenceError: Overlay is not defined 

      If I replace the first include with QtQuick.Controls, it works, but I loose the benefit of compile-time style selection.
      The same happens, if you remove the imports completely and hardcode the IMPORTS via CMake/qt_add_qml_module (not in this simple example, but my bigger test app where I first encountered this problem)
       
      The same happens when importing .Fusion instead of .Material.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-104768
          # Subject Branch Project Status CR V

          Activity

            People

              ulherman Ulf Hermann
              rgriebl Robert Griebl
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes