Skip to content

Commit

Permalink
BUG: fix qt_embedding example under PySide
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelVaroquaux committed Feb 4, 2012
1 parent fac6525 commit 1dd3dba
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions examples/mayavi/interactive/qt_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
# import sip
# sip.setapi('QString', 2)

from traits.api import HasTraits, Instance, on_trait_change, \
Int, Dict
from traits.api import HasTraits, Instance, on_trait_change
from traitsui.api import View, Item
from mayavi.core.ui.api import MayaviScene, MlabSceneModel, \
SceneEditor
Expand Down Expand Up @@ -53,7 +52,11 @@ class MayaviQWidget(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
layout = QtGui.QVBoxLayout(self)
layout.setMargin(0)
try:
layout.setMargin(0)
except AttributeError:
# Pyside doesn't have a setMargin
pass
layout.setSpacing(0)
self.visualization = Visualization()

Expand Down

0 comments on commit 1dd3dba

Please sign in to comment.