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

AreaSeries in QML does not trigger onClicked signal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.2
    • Graphs: 2D
    • None
    • Windows 11
    • Windows

      I'm exploring QtGraphs in QML and I'm having trouble with the onClicked signal for an AreaSeries. the onClicked ( or onDoubleClicked ) never seems to be triggered when I click the area, and there are no errors or warnings printed in the console. I'm relatively new to this module and couldn't find a specific example for this in the documentation.

      Is this an expected behavior, or if I am using it incorrectly? A minimal reproducible example is provided below. 

      Steps to Reproduce:

          1. Create a simple Qt Quick application using Qt 6.9.2, PySide6==6.9.2.

          2. Define a GraphsView and AreaSeries.

          3. Implement the onClicked handler for the AreaSeries.

          4.Run the main.py file and click on the area.

      Expected Result:
      The clicked signal should be emitted when the area graph is clicked, and the corresponding slot (e.g., onClicked) should be executed, printing somthing and updating the area'color as defined in the handler.

      Actual Result:
      The clicked signal is not emitted when clicking on the area graph. As a result, the UI does not update, and no console output is generated from within the onClicked handler.

        1. demo.qml
          1 kB
        2. main.py
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            kagro Kaj Grönholm
            camellia yi Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes