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

Assigning [] to ShapePath.pathElements does not trigger a redraw

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.3
    • Quick: Shapes
    • None
    • All

    Description

      Consider the case one has a ShapePath with some Paths already added to its pathElements. Now I want to clear the ShapePath off all of its paths. Since we can not modify QML lists, we usually must assign a new javascript array to alter it.

      Assigning the empty array "[]" to it clears its pathElements, as expected. But the ShapePath is not redrawn, causing the now deleted paths to still be displayed.

       

      See the attached .qml file for an example.

       

      Assigning null to ShapePath.pathElements is a workaround, but it prints this error message: QObject::connect: Cannot connect (nullptr)::changed() to QQuickShapePath::processPath()

       

      StackO discussion: https://stackoverflow.com/q/65479982/5341805

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            skaldesh Sebastian Borchers
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes