def update_geometry(obj):
 def _update_geometry():
  'Actually update the geometry if the object still exists.'
  if sip.isdeleted(obj):
   return
  obj.updateGeometry()
 QTimer.singleShot(0, _update_geometry)

def update_geometry ( obj ) : def _update_geometry ( ) : if sip . isdeleted ( obj ) : return obj . updateGeometry ( ) QTimer . singleShot ( 0 , _update_geometry )
weird workaround for some weird pyqt bug .