Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QChart On Click Signal?
Forum Updated to NodeBB v4.3 + New Features

QChart On Click Signal?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 1.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MrShawn
    wrote on last edited by
    #1

    Hi,

    I am looking for an OnClick signal for QChart (or something in the ballpark). I have done it with a pie chart on the individual slices.
    I want to expand the size of the entire chart when clicked, so it doesn't make sense to do on an individual series or item on the chart.

    Does a signal like this exist?

    Thanks,
    -MrShawn

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Since QChart is QGraphicsWidget, maybe just subclass it and
      add
      void mousePressEvent(QGraphicsSceneMouseEvent *event);

      I have not seen such signal but on other hand, i have not used QChart
      very much.

      If subclassing is not optimal, a event filter might work.

      1 Reply Last reply
      2
      • M Offline
        M Offline
        MrShawn
        wrote on last edited by
        #3

        Thanks for the response...

        Still pretty new to QT been at it a few weeks now when I get the time. Subclassing seems a little much for me right now I just added an event filter for the mousebuttonpress and it does seem to recognize my clicks.

        This should be what I need to move forward on my implementation.

        Thank you much.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved