diff --git a/skimage/viewer/plugins/base.py b/skimage/viewer/plugins/base.py index 85d75b95..f5fbf935 100644 --- a/skimage/viewer/plugins/base.py +++ b/skimage/viewer/plugins/base.py @@ -6,7 +6,7 @@ from warnings import warn import numpy as np from ..qt import QtGui -from ..qt.QtCore import Qt, pyqtSignal +from ..qt.QtCore import Qt, Signal from ..utils import RequiredAttr, init_qtapp @@ -75,8 +75,8 @@ class Plugin(QtGui.QDialog): image_viewer = RequiredAttr("%s is not attached to ImageViewer" % name) # Signals used when viewers are linked to the Plugin output. - image_updated = pyqtSignal(np.ndarray) - _started = pyqtSignal(int) + image_updated = Signal(np.ndarray) + _started = Signal(int) def __init__(self, image_filter=None, height=0, width=400, useblit=True, dock='bottom'): diff --git a/skimage/viewer/qt/QtCore.py b/skimage/viewer/qt/QtCore.py index 60c5566e..19b92a53 100644 --- a/skimage/viewer/qt/QtCore.py +++ b/skimage/viewer/qt/QtCore.py @@ -4,6 +4,9 @@ if qt_api == 'pyside': from PySide.QtCore import * elif qt_api == 'pyqt': from PyQt4.QtCore import * + # Use pyside names for signals and slots + Signal = pyqtSignal + Slot = pyqtSlot else: # Mock objects for buildbot (which doesn't have Qt, but imports viewer). class Qt(object): @@ -12,5 +15,8 @@ else: LeftDockWidgetArea = None RightDockWidgetArea = None - def pyqtSignal(*args, **kwargs): + def Signal(*args, **kwargs): + pass + + def Slot(*args, **kwargs): pass