From a08c9e91e0c431b97a841038f305ddaca7e5f49d Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 6 Jul 2015 09:51:59 +0200 Subject: [PATCH] Ludger reported a Qt Problem that the MPLWidget was not recognized as an PySide.QtGui.QWidget; the problem was not reproducible on my system; maybe the problem was caused because getnoisewin is now imported from pick/utils and there matplotlib is imported for plotting reasons but to clarify the Qt backend used by matplotlib, it should not be imported before --- QtPyLoT.py | 4 ++++ pylot/core/util/widgets.py | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index a63153d5..9fc6c8fd 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -24,6 +24,10 @@ https://www.iconfinder.com/iconsets/flavour """ import sys +import matplotlib + +matplotlib.use('Qt4Agg') +matplotlib.rcParams['backend.qt4'] = 'PySide' from PySide.QtCore import QCoreApplication, QSettings, Signal, QFile, \ QFileInfo, Qt diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index d0011911..04911f54 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -7,10 +7,6 @@ Created on Wed Mar 19 11:27:35 2014 import datetime import numpy as np -import matplotlib - -matplotlib.use('Qt4Agg') -matplotlib.rcParams['backend.qt4'] = 'PySide' from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import FigureCanvas