def __init__(self): self.children = [] # Stuff for display synchronization in e2.py self.timer_function = None self.tmr = None QtWidgets.QApplication.__init__(self, sys.argv) style = QtWidgets.QStyleFactory.create( "Fusion") # seems like Qt5 in Anaconda only has Windows and Fusion # style=QtWidgets.QStyleFactory.create("Plastique") # this was used in Qt4 if style == None: print( "Note: standard Fusion style not available, controls may be distorted. Using ", end=' ') # the first one should work, but we have the loop, just in case for s in list(QtWidgets.QStyleFactory.keys()): style = QtWidgets.QStyleFactory.create(s) if style != None: print(s) break if style != None and get_platform() != "Darwin": self.setStyle(style) if em_app_instance.get_instance() == None: em_app_instance.set_instance(self)
def resize(self, w, h): if self.qt_parent: QtOpenGL.QGLWidget.resize(self, w, h) if get_platform() == "Darwin": self.qt_parent.resize(w, h + 22) else: self.qt_parent.resize(w + 4, h + 4)
def resize(self, w, h): if self.qt_parent: QtOpenGL.QGLWidget.resize(self, w, h) if get_platform()=="Darwin" : self.qt_parent.resize(w, h+22) else : self.qt_parent.resize(w+4, h+4)