diff --git a/src/mlpro/bf/plot/backends/qtagg.py b/src/mlpro/bf/plot/backends/qtagg.py index e916f22cb..c810102f1 100644 --- a/src/mlpro/bf/plot/backends/qtagg.py +++ b/src/mlpro/bf/plot/backends/qtagg.py @@ -49,10 +49,9 @@ def _figure_force_foreground_default(self, p_figure : Figure): def _figure_get_geometry_default(self, p_figure : Figure) -> WindowGeometry: # 1 Get size and position - window = p_figure.canvas.manager.window - geometry = window.geometry() - pos = geometry.topLeft() - size = geometry.size() + window = p_figure.canvas.manager.window + pos = window.pos() + size = window.size() # 2 Get window state state_qt = window.windowState() diff --git a/src/mlpro/bf/plot/basics.py b/src/mlpro/bf/plot/basics.py index df9f347aa..f50df0cfd 100644 --- a/src/mlpro/bf/plot/basics.py +++ b/src/mlpro/bf/plot/basics.py @@ -570,8 +570,9 @@ def _init_figure(self, p_window_title: str = None): # 5 Make window visible - # while not self._plot_window.winfo_viewable(): - plt.pause(0.01) + # while not self._plot_window.winfo_viewable(): # Tk + # while not self._plot_window.isVisible(): # Qt + plt.pause(0.1) # 6 Recover size and position of the window