def __init__(self): super(CadWindowMdi, self).__init__() self.mdiArea = QtGui.QMdiArea() self.mdiArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) self.mdiArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) self.setCentralWidget(self.mdiArea) self.mdiArea.subWindowActivated.connect(self.subWindowActivatedEvent) self.oldSubWin = None # self.readSettings() #now works for position and size, support for toolbars is still missing(http://www.opendocs.net/pyqt/pyqt4/html/qsettings.html) self.setWindowTitle("PythonCAD") qIcon = self._getIcon('pythoncad') if qIcon: self.setWindowIcon(qIcon) self.setUnifiedTitleAndToolBarOnMac(True) #pythoncad kernel self.__application = Application() self.__cmd_intf = CmdIntf(self) #self.__cmd_intf.FunctionHandler.commandExecuted+=self.commandExecuted # create all dock windows self._createDockWindows() # create status bar self._createStatusBar() self.setUnifiedTitleAndToolBarOnMac(True) self._registerCommands() self.updateMenus() self.lastDirectory = os.getenv('USERPROFILE') or os.getenv('HOME') self.readSettings( ) #now works for position and size and ismaximized, and finally toolbar position self.updateOpenFileList() self.updateRecentFileList() return