<span style>Hello, </span><div style><br></div><div style>I am using PyQt4 and chaco plot to make a data-analysis program.For each analysis script i run, i generate a plot (chaco.plot) contained into a PyQt4.QtGui.QWidget. </div>
<div style>As i want to have different processes, i embed all the Qwidget generated in a dictionnary, itself part of a "plot_manager" object:</div><div style><br></div><div style><div>class PlotManager():</div><div>
    def __init__(self,plotwindow):</div><div>        self.activeplot=None</div><div>        self.plot_dict={}</div><div><br></div></div><div style>Each time i generate a plot, i update the PlotManager.plot_dict: </div><div style>
plot_dict={'Fig0':QWidget Instance, Fig1':Qwidget Instance, ... }</div><div style><br></div><div style>The activeplot attribute of the PlotManager serves to determine which of the generated plots has the focus, and can be modified by the program. </div>
<div style>What i would like to do is to change the activeplot when i click on one of the QWidget window. </div><div style><br></div><div style>I have tried to use the "mouseClickEvent" of the qwidget, but it does not work: when i click on the plot, it seems that the focus is taken by the children of the QWidget (the plot and toolbar inside). </div>
<div style>Is there a signal that is emitted when one clicks on the widget, and could i connect a function of the PlotManager that would then change the activeplot ? </div><div style><br></div><div style>Thanks a lot,</div>
<div style><br></div><div style>Pierre</div>