Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Edit pyqtgraph mouse interactivity capabilities?
Forum Updated to NodeBB v4.3 + New Features

Edit pyqtgraph mouse interactivity capabilities?

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 911 Views 1 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
    MikeLemon
    wrote on last edited by
    #1

    I'd like to add some functionality to pyqtgraph to allow zooming into graph section with mouse drag like in matplot lib and another where a rect floatting bubble near the mouse cursor tells you according to the cursor in steps (or analog for more mathy data analysis) what the Y components equals to in each X the mouse is pointing to and I'd like to ask how one would approach such a development?

    Can you add all this functionality externally with Qt framework or would I have to dig into how pyqtgraph library works(if so where is it even located(cant find it is local data and lib internal folders))?

    How does that hover bubble for the mouse called in QT BTW?

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

      Hi,

      You might be talking about QToolTip.

      As for PyQtGraph, you should contact the authors of that module.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        You might be talking about QToolTip.

        As for PyQtGraph, you should contact the authors of that module.

        M Offline
        M Offline
        MikeLemon
        wrote on last edited by
        #3

        @SGaist Yeah QToolTip is probably what I'm looking for with message that follows the mouse cursor and I meant to ask this as a general question regarding how'd one debug inheritance and function of an external Qt widget module and add interactivity upon a functioning Widget,
        For example I'm about to go with the approach of creating a class that inherits from pg.PlotWidget and copy the function content of mouseMoveEvent() from GraphicsView.py of the pyqtgraph library file to my redefinition of it and in my file and then add my functionality at the end of the function.

        But that seem quite cumbersome and what if I don't want to copy the correct content of the mouseMoveFucntion()? is it possible to just add more lines to that function without redefining it?

        Also there is a signal emitted every time the mouse move, is it possible to connect to it another callback function? I think I might have tyed that and it haven't worked.

        Anyways this are the kind of questions I'm trying to address with this post.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          If you want to have the complete code of the original function run, just call the base class implementation in your method overload.

          There are no signals sent when the mouse moves. There are the mouse event handlers.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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