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

Attached ScrollBar and ScrollIndicator fail when using QML Type Compiler

    XMLWordPrintable

Details

    • All
    • db7267cd6 (dev), fa415aa37 (6.7), c59880a48 (6.6), 2affa3ab9 (tqtc/lts-6.5)

    Description

      The QML Type Compiler reports ScrollIndicator and ScrollBar are not found.

      Importing "QtQuick.Controls" from `qt_add_qml_module` has no effect on this issue.

      To replicate the issue:

      1. Create QML project that has use of Type Compiler enabled
      2. In QML, create a ListView, and attach either a ScrollIndicator or a ScrollBar property
      3. Build program

      Example code is attached. Important excerpts here:

      // CMakeLists.txt

      qt_add_qml_module(${PROJECT_NAME}
          URI Experiments
          RESOURCE_PREFIX /qt/qml/
          IMPORTS
          "QtQuick.Controls"
          DEPENDENCIES
          QtQuick
          QML_FILES
          "main.qml"
          ENABLE_TYPE_COMPILER
      )

      // .qml file

      import QtQuick.Controls

      ListView {
      {{    ScrollIndicator.vertical: ScrollIndicator { }}}
      }

      ListView {
      {{    ScrollBar.vertical: ScrollBar { }}}
      }{}

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              sami.shalayel Sami Shalayel
              cuperino Javier Cordero
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes