本文整理汇总了Python中gui.MainWindow.show方法的典型用法代码示例。如果您正苦于以下问题:Python MainWindow.show方法的具体用法?Python MainWindow.show怎么用?Python MainWindow.show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gui.MainWindow
的用法示例。
在下文中一共展示了MainWindow.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
app = QtGui.QApplication(sys.argv)
app_window = MainWindow(display_width,display_height)
app_window.show()
app.exec_()
示例2: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
# create the Application
app = QtWidgets.QApplication(sys.argv)
# create the event loop
event_loop = QEventLoop(app)
asyncio.set_event_loop(event_loop)
# Create the Gui
main_window = MainWindow()
# plugins to include different websites (and listeners?)
plugin_manager = PluginManager()
plugin_manager.register_main_window(main_window)
# User Settings
settings_manager = SettingsManager()
settings_manager.register_main_window(main_window)
settings_manager.register_plugin_manager(plugin_manager)
main_window.show()
try:
event_loop.run_forever()
except KeyboardInterrupt:
pass
app.deleteLater()
plugin_manager.terminate_plugins()
event_loop.close()
sys.exit()
示例3: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
app = QApplication(sys.argv)
args = app.arguments()
args = map(str, args)
if platform.system() == 'Windows' and 'python' in args[0]:
args = args[1:]
config = parse_args(args[1:])
if config['verbose'] > 0:
logging.basicConfig(level=logging.DEBUG)
win = MainWindow(config)
win.setFixedSize(600, 400)
win.setWindowTitle('BrytonOffline')
win.setWindowIcon(QIcon(resource_path('img/bryton_logo.jpg')))
win.show()
return app.exec_()
示例4: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main(argv):
check_pyopenssl_version()
options = None
app = QApplication(sys.argv)
ui = MainWindow(options)
ui.setWindowTitle('MitmUI v0.1')
ui.show()
sys.exit(app.exec_())
示例5: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
"""
Start the program
"""
# Initialize the backend
hardware = Hardware("config/hardware.json")
# Initialize the GUI
app = QtGui.QApplication(sys.argv)
window = MainWindow(hardware)
# Start
window.show()
sys.exit(app.exec_())
示例6: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main(path=None, page=None):
"""Run the normal interface."""
app = QtGui.QApplication(sys.argv)
if path is not None:
config.settings.Main.Package = path
window = MainWindow()
if page is not None:
window.set_page(page)
center_window(window)
window.show()
warn.set_warnings_qt()
exit_code = app.exec_()
prepare_quit(window)
return exit_code
示例7: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
# create the GUI
app = QtWidgets.QApplication(sys.argv)
# create the event loop
event_loop = QEventLoop(app)
asyncio.set_event_loop(event_loop)
main_window = MainWindow()
# need chat_slot to be able to add to add the chat signal
chat_slot = main_window.central_widget.message_area.chat_slot
settings = get_settings_helper()
# this methods also handles passing in values to websites
plugin_manager = instantiate_plugin_manager(settings)
main_window.set_settings(settings)
chat_list = plugin_manager.get_instances()
# connect the sockets signals to the GUI
for chat in chat_list:
chat.chat_signal.connect(chat_slot)
chat.connected_signal.connect(main_window.status_bar.set_widget_status)
listener_interface = pluginmanager.PluginInterface()
listener_interface.collect_plugins(plugins)
listener_list = listener_interface.get_instances() # flake8: noqa
# main_window.central_widget.message_area.listeners = listener_list
main_window.show()
try:
event_loop.run_forever()
except KeyboardInterrupt:
pass
for chat in chat_list:
if chat.process:
chat.process.terminate()
event_loop.close()
sys.exit()
示例8: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
# create the Application
app = QtWidgets.QApplication(sys.argv)
# create the event loop
event_loop = QEventLoop(app)
asyncio.set_event_loop(event_loop)
# Create the Gui
main_window = MainWindow()
# plugins to include different websites (and listeners?)
plugin_manager = PluginManager()
plugin_manager.register_main_window(main_window)
# User Settings
settings_manager = SettingsManager()
settings_manager.register_main_window(main_window)
settings_manager.register_plugin_manager(plugin_manager)
# listeners handeled separatly for now
listener_interface = pluginmanager.PluginInterface()
listener_interface.collect_plugins(plugins)
listener_list = listener_interface.get_instances() # flake8: noqa
# main_window.central_widget.message_area.listeners = listener_list
main_window.show()
try:
event_loop.run_forever()
except KeyboardInterrupt:
pass
app.deleteLater()
plugin_manager.terminate_plugins()
event_loop.close()
sys.exit()
示例9: setup_logger
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
NUMBER_OF_ROWS = 10 ** 2
NUMBER_OF_COLS = 10
ROW_OFFSET = 2
COL_OFFSET = 2
VALUES_BUTTON_MAX_WIDTH = 50
VARIABLE_LIST_COLS_WIDTH = 50
VARIABLE_LIST_COL_N_WIDTH = 20
VARIABLE_LIST_COLS_COUNT = 6
N_ROLE = 0
NAME_ROLE = 1
TYPE_ROLE = 2
WIDTH_ROLE = 3
DECIMAL_ROLE = 4
LABEL_ROLE = 5
if __name__ == '__main__':
sys.excepthook = handle_exception
setup_logger("FS")
app = QApplication(sys.argv)
app.setStyle("Fusion")
app.blockSignals(True)
fill_random()
app.blockSignals(False)
window = MainWindow()
window.show()
exit_code = app.exec_()
sys.exit(exit_code)
示例10: weblogin
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
#!/usr/bin/python
# -*- coding: utf-8 -*-
from PyQt5 import QtWidgets
from gui import MainWindow, GuiManger
from app import StatusClientThread
from gui.uiconfig import windowsoptions
from gui.dialogs import weblogin
if __name__ == '__main__':
import sys
app = QtWidgets.QApplication(sys.argv)
loginsettings = windowsoptions['weblogin_window']
login_flag, address = weblogin(loginsettings)
if login_flag:
mainwindow = MainWindow()
guimanger = GuiManger(address)
statusThread = StatusClientThread(address)
statusThread.daemon = True
statusThread.start()
mainwindow.show()
sys.exit(app.exec_())
示例11: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main(argv = sys.argv):
app = QApplication(argv)
win = MainWindow()
win.show()
return app.exec_()
示例12: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
app = QApplication(sys.argv)
window = MainWindow()
window.show()
app.exec_()
示例13: print
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
filename = default_filename
print('Change your default settings!')
with open(filename) as setting_file:
settings = json.load(setting_file)
# alias out the individual settings for each of the sockets
chrome_server_settings = settings['chrome_tcp_server']
wpc_settings = settings['watchpeoplecode']
twitch_settings = settings['twitch']
# instantiate the sockets
wpc_socket = socket_protocols.ReadOnlyWebSocket(wpc_settings['channel'])
irc_client = socket_protocols.ReadOnlyIRCBot(twitch_settings['channel'],
twitch_settings['nick'],
twitch_settings['oauth_token'])
youtube_scrapper = YoutubeScrapper('https://www.youtube.com/watch?v=W2DS6wT6_48')
# create the GUI
app = QtWidgets.QApplication(sys.argv)
main_window = MainWindow()
main_window.show()
# connect the sockets signals to the GUI
youtube_scrapper.chat_signal.connect(main_window.chat_string_slot)
wpc_socket.chat_signal.connect(main_window.chat_string_slot)
irc_client.chat_signal.connect(main_window.chat_string_slot)
# loop... forever
sys.exit(app.exec_())
示例14: DB
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
db = DB()
self.edited_item = db.return_item("Talk", self.outline_id)
self.line_number.setText(self.edited_item[0][1])
self.line_title.setText(self.edited_item[0][2])
def save_edit(self):
"""
Save edits made by the user to the selected outline.
"""
number = self.line_number.displayText()
title = self.line_title.displayText()
outline = Outline()
submission = outline.edit_outline(self.edited_item[0][1],
self.edited_item[0][2], number, title,
self.edited_item[0][0])
if submission[0] == 'True':
self.done(True)
else:
error = QtGui.QMessageBox.critical(self, 'Error', submission[1])
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
my_app = MainWindow()
my_app.show()
sys.exit(app.exec_())
示例15: main
# 需要导入模块: from gui import MainWindow [as 别名]
# 或者: from gui.MainWindow import show [as 别名]
def main():
app = QApplication(sys.argv)
w = MainWindow()
w.show()
sys.exit(app.exec_())