本文整理汇总了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
示例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))
示例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_())
示例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_())
示例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_()
示例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()
示例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_()
示例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_()
示例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_()
示例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_())
示例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_()
示例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_()
示例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)
示例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
示例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_()