active window: problems with plot and qwidget

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

active window: problems with plot and qwidget


I am using chaco to generate plots for a data analysis program. In summary,
for each analysis i run, i generate a ToolbarPlot contained into a

All the plots are generate are contained within a dictionnary, attribute of
 a "plot_manager" object.

class PlotManager():
    def __init__(self,plotwindow):

Each time i generate a plot, i update the PlotManager.plot_dict:
plot_dict={'Fig0':Plot Instance, Fig1':Plot Instance, ... }

The activeplot attribute serves to determine which of the generated plots
has the focus, and can be modified by the program.
What i would like to do is to change the activeplot when i click on one of
the plot window, and to bring the activeplot forward when the program
changes the activeplot.

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
ToolBarPlot children of the qwidget.
And i have not found any function that allows to bring a specific window

Do you have hints on how to do that ?
Enthought-Dev mailing list
[hidden email]