Пример #1
0
    def findMdiChild(self, fileName):
        canonicalFilePath = QtCore.QFileInfo(fileName).canonicalFilePath()

        for window in self.mdiarea.subWindowList():
            if window.widget().currentFile() == canonicalFilePath:
                return window
        return None
Пример #2
0
 def strippedName(self, fullFileName):
     return QtCore.QFileInfo(fullFileName).fileName()
Пример #3
0
 def setCurrentFile(self, fileName):
     self.curFile = QtCore.QFileInfo(fileName).canonicalFilePath()
     self.isUntitled = False
     self.document().setModified(False)
     self.setWindowModified(False)
     self.setWindowTitle(self.userFriendlyCurrentFile() + '[*]')