当前位置: 首页>>代码示例>>Python>>正文


Python MainWindow.show方法代码示例

本文整理汇总了Python中MainWindow.MainWindow.show方法的典型用法代码示例。如果您正苦于以下问题:Python MainWindow.show方法的具体用法?Python MainWindow.show怎么用?Python MainWindow.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MainWindow.MainWindow的用法示例。


在下文中一共展示了MainWindow.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: controller

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
class controller():
    def __init__(self):
        
        self.initUI()
        
    def initUI(self): 
        self.mw=MainWindow(self)
        self.mw.show()
        self.add_Filtermethods()
        #self.need_Param()
    def need_Param(self,a="HP",b="Chebychev 1",c="man"):
        if a=="HP" and b=="Chebychev 1": 
            b="cheby1"
            return self.filter.get(b).needHP()
        else:
            return "noch nicht implementiert"
    def add_Filtermethods(self):
        self.filter={}
        fobj=open("init.txt","r")
        for line in fobj:
            line=line.strip()
            #a=  eval(line) 
            a=getattr(sys.modules[__name__], line)()
            self.filter.update({line:a})
        fobj.close
开发者ID:jbeike,项目名称:DSV.2,代码行数:27,代码来源:controller.py

示例2: _Run

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def _Run(argv):
    
    from CDUtilsPack.MetaUtils import UserException
    from PackUtils.CoreBaseException import CoreBaseException     
    from SectionFactory import CreateSectionsByCfg
    from MainWindow import MainWindow
        
    try:
        appLoop = QtGui.QApplication(argv)  # for Qt widgets using 
        
        imgs = _ImageLoader(dir = 'Images')
        sett = _CmdLineParser(argv)        
                
        absFileName = os.path.join(os.getcwd(), sett['cfg'])
        del sett['cfg']                       
        sectionDict = CreateSectionsByCfg(absFileName, imgs)        
        
        app = MainWindow(sectionDict, imgs)        
        app.show()                                      

        appLoop.exec()             
                   
    except UserException as e:
        print ("Aborted!\nStart-up error:", e)        
    
    except CoreBaseException as e:
        print("Aborted!\n{0}: {1}".format(type(e).__name__, e))
开发者ID:ixc-software,项目名称:lucksi,代码行数:29,代码来源:Main.py

示例3: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main():
    global app
    global mainWindow
    app = QApplication(sys.argv)
    mainWindow = MainWindow()
    mainWindow.show()
    sys.exit(app.exec_())
开发者ID:tajoy,项目名称:GOC,代码行数:9,代码来源:GOC.py

示例4: PyQtGuiController

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
class PyQtGuiController(GuiControllerBase):
    def __init__(self):
        super(PyQtGuiController, self).__init__()
        self.app = QtGui.QApplication(sys.argv)
        self.win = MainWindow(self)
    def getDirName(self, title, dir, filter):
        temp = QtGui.QFileDialog.getExistingDirectory(self.win, title, dir)
        return str(temp)
    def getFileNames(self, title, dir, filter):
        temp = QtGui.QFileDialog.getOpenFileNames(self.win, title, dir, filter)
        fileNames = map(str, temp)
        return fileNames
    def getSaveName(self, title, dir, filter):
        temp = QtGui.QFileDialog.getSaveFileName(self.win, title, dir, filter)
        fileName = str(temp)
        return fileName
        
    def getReloadDataIndex(self):
        if self.dataModel.getCount() == 0:
            self.showErrorMessage('Error', 'There\'re no enough data!')
            return
        names = self.dataModel.getNameDict()
        return self.getDataIndex(names, "Select the data to be reloaded")
    def getDataIndex(self, names, word):
        items = names.keys()
        item, ok = QtGui.QInputDialog.getItem(self.win, word, "Data:", items, 0, False)
        if ok and item:
            item = str(item)
            index = int(names[item])
            del names[item]
            return index
    def getRegisterDataIndex(self):
        if self.dataModel.getCount() < 2:
            self.showErrorMessage('Error', 'There\'re no enough data!')
            return
        names = self.dataModel.getNameDict()
        fixedIndex = self.getDataIndex(names, "Select the fixed image")
        if fixedIndex is not None:
            movingIndex = self.getDataIndex(names, "Select the moving image")
            if movingIndex is not None:
                return (fixedIndex, movingIndex)
    def getInputName(self, window):
        name, ok = QtGui.QInputDialog.getText(self.win, "Enter the name", 
                "Name:", QtGui.QLineEdit.Normal, window.getName())
        return name, ok
    def getInputPara(self, window, title, initial = 0.0):
        data, ok = QtGui.QInputDialog.getDouble(self.win, "Enter the " + title.lower(), 
                title.capitalize() + ":", initial)
        return data, ok
    def showErrorMessage(self, title, message):
        QtGui.QMessageBox.information(self.win, title, message)
    def showMessageOnStatusBar(self, text):
        return self.win.showMessageOnStatusBar(text)
    def getMessageOnStatusBar(self):
        return self.win.getMessageOnStatusBar()
    def addNewDataView(self, data):
        return self.win.addNewDataView(data)
    def startApplication(self): 
        self.win.show()
        sys.exit(self.app.exec_())
开发者ID:guohengkai,项目名称:MIRVAP,代码行数:62,代码来源:PyQtGuiController.py

示例5: run

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def run():
    # PySide fix: Check if QApplication already exists. Create QApplication if it doesn't exist 
    app = QtGui.QApplication.instance()        
    if not app:
        app = QtGui.QApplication(sys.argv)
    window = MainWindow()
    window.show()
    app.exec_()
开发者ID:mhogg,项目名称:BMDanalyse,代码行数:10,代码来源:BMDanalyse.py

示例6: PVDataTools

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
class PVDataTools(QtGui.QApplication):

    def __init__(self, sys_argv):
        super().__init__(sys_argv)

        self.model = Model()
        self.main_window = MainWindow(self.model)
        self.main_window.show()
        self.main_window.new_dataviewer()
开发者ID:DGalt,项目名称:pvdatatools,代码行数:11,代码来源:PVDataTools.py

示例7: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main():
    #Add this so we can pickle QTextDocuments
    copy_reg.pickle(QTextDocument,pickle_QtD,unpickle_QtD)
    app = QApplication(sys.argv)
    mainWindow = MainWindow()
    mainWindow.setWindowTitle("WireFrame Model")
    mainWindow.show()
    mainWindow.centralWidget().viewingWindow.animate()
    app.exec_()
开发者ID:jaredwindover,项目名称:mindGrid,代码行数:11,代码来源:main.py

示例8: App

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
class App(QApplication):

    def __init__(self, argv):
        super(App, self).__init__(argv)
        self.mainwindow = MainWindow()

    def exec_(self, *args, **kwargs):
        self.mainwindow.show()
        super(App, self).exec_()
开发者ID:abalint,项目名称:ChessAnalyser,代码行数:11,代码来源:App.py

示例9: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main(argv):
    app = QApplication(sys.argv)

    # Constructing gui...
    mainWindow = MainWindow()
    mainWindow.show()

    # Start event processing...
    app.exec_()
开发者ID:anarsoul,项目名称:wicd-qt4,代码行数:11,代码来源:wicd-qt4.py

示例10: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main():
    import sys

    app = QApplication(sys.argv)

    screen = MainWindow()
    screen.show()

    sys.exit(app.exec_())
开发者ID:arturnista,项目名称:RPGSoundController,代码行数:11,代码来源:main.py

示例11: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main():
    config = ConfigParser.SafeConfigParser(allow_no_value=True)
    internalConfig = ConfigParser.SafeConfigParser(allow_no_value=True)
    config.read("config.ini")
    internalConfig.read("internal-config.ini")

    w = MainWindow(config, internalConfig)
    w.show()
    return app.exec_()
开发者ID:dspieringsvdw2,项目名称:manualdaq,代码行数:11,代码来源:__main__.py

示例12: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main():
    app = QApplication(sys.argv)

    w = MainWindow()
    w.setWindowTitle("Task Visualizer")
    w.resize(1000, 500)

    w.move(10, 10)
    w.show()
    app.exec_()
开发者ID:Unit978,项目名称:TaskVisualizer,代码行数:12,代码来源:main.py

示例13: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main():
    app = QtGui.QApplication(sys.argv)
    guiDelegate = delegate.GuiDelegate()
    window = MainWindow(guiDelegate=guiDelegate)
    guiDelegate.set_main_window(window)

    window.show()
    excode = app.exec_()
    guiDelegate.exit()
    sys.exit(excode)
开发者ID:lassevalentini,项目名称:mail-attachment-downloader,代码行数:12,代码来源:main.py

示例14: main

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
def main(args):
    mainApp=QtGui.QApplication(args)
    fenetre=QWidget()
    label1 = QLabel("Bienvenue")


    MainWindow2=MainWindow()
    MainWindow2.show()


    r=mainApp.exec_()
    return r
开发者ID:Darkyler,项目名称:Piscine,代码行数:14,代码来源:MainView.py

示例15: LheidoEdit

# 需要导入模块: from MainWindow import MainWindow [as 别名]
# 或者: from MainWindow.MainWindow import show [as 别名]
class LheidoEdit(QApplication):
	""" LheidoEdit app class extend QApplication """
	
	def __init__ (self, argv):
		QApplication.__init__(self, argv)
		self.__mainWin = MainWindow()
		with open("dev-theme/dev_theme.css") as t:
			dev_theme = t.read()
		self.setStyleSheet(dev_theme)
	
	def run(self):
		self.__mainWin.show()
		self.exec_()
开发者ID:lheido,项目名称:lheidoEdit,代码行数:15,代码来源:lheidoEdit.py


注:本文中的MainWindow.MainWindow.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。