本文整理匯總了Python中GUI.start方法的典型用法代碼示例。如果您正苦於以下問題:Python GUI.start方法的具體用法?Python GUI.start怎麽用?Python GUI.start使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GUI
的用法示例。
在下文中一共展示了GUI.start方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: gui_thread
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import start [as 別名]
class gui_thread(Qt.QThread):
def __init__(self):
Qt.QThread.__init__(self)
parser = OptionParser(option_class=eng_option, usage="%prog: [options]")
(options, args) = parser.parse_args()
if(StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0")):
Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster'))
self.qapp = Qt.QApplication(sys.argv)
self.gui=GUI()
def update1(self,L) :
self.gui.draw1(L)
def update2(self,L) :
self.gui.draw2(L)
def run(self):
self.gui.start()
self.gui.show()
def quitting():
self.gui.stop()
self.gui.wait()
self.qapp.connect(self.qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
示例2: CLI
# 需要導入模塊: import GUI [as 別名]
# 或者: from GUI import start [as 別名]
# -*- coding: utf-8 -*-
######################################################################
# Program for registrering av medlemmer #
# Medlemmer lagres i en teksfil på formatet #N Full Name::user name #
# Skrevet av Sindre Wetjen, orginal av Line Moseng #
######################################################################
import sys
from CLI import CLI
if __name__ == "__main__":
print "Welcome to verdandes simple registration system"
print "type 'help' for help"
output = "default.db"
if sys.argv.count('-o') != 0:
oindx = 1 + sys.argv.index('-o')
output = sys.argv[oindx] + ".db"
if "--cli" in sys.argv or "-c" in sys.argv:
cli = CLI(output)
cli.start()
else:
try:
import GUI
GUI.start(output)
except Exception as e:
print "There was an error with the GUI, falling back to CLI"
cli = CLI(output)
cli.start()