Hi,
I'm doing a signal viewver to define manualy signal artifacts (as shown in the picture).
I'm using a pyqtgraph.ViewBox to show and 'replay' the signals. When there is a ctrl + mouse click on the viewbox, the application add a pyqtgraph.LinearRegionItem() :
self.viewBox.clicked.connect(self.handle_click)
with self.handle_clik() is the method that add a new region item (stored on a list)
after checking we have a pyqtgraph.Qt.QtCore.Qt.ControlModifier.
I would like the user to be able to suppress a selected region item with a keypress on 'suppr'
using a keyPressEvent method overload.
Is there a way to get the current LinearRegionItem (= the one selected by the mouse, not always the last one created) to delete it ?
By the way, is it the correct way to proceed ?
Thanks!
Best
alexandra