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


Python MainWindow.show方法代码示例

本文整理汇总了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_()
开发者ID:mtb-beta,项目名称:melody_catcher,代码行数:9,代码来源:melody_catcher.py

示例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()
开发者ID:ChunHungLiu,项目名称:CHATIMUSMAXIMUS,代码行数:30,代码来源:__main__.py

示例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_()
开发者ID:Pitmairen,项目名称:bryton-offline,代码行数:27,代码来源:main.py

示例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_())
开发者ID:karnex47,项目名称:mitm-ui,代码行数:10,代码来源:MitmUI.py

示例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_())
开发者ID:bwwyyy,项目名称:hardware-traffic-generator,代码行数:17,代码来源:generator_gui.py

示例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
开发者ID:3D1T0R,项目名称:PortableApps.com-DevelopmentToolkit,代码行数:19,代码来源:main.py

示例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()
开发者ID:AyberkHalac,项目名称:CHATIMUSMAXIMUS,代码行数:42,代码来源:__main__.py

示例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()
开发者ID:amit63731,项目名称:CHATIMUSMAXIMUS,代码行数:38,代码来源:__main__.py

示例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)
开发者ID:mhhg,项目名称:FarsStat,代码行数:32,代码来源:fars_stat.py

示例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_())
开发者ID:dragondjf,项目名称:ov-orange-01,代码行数:26,代码来源:main.py

示例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_()
开发者ID:D3f0,项目名称:pypii,代码行数:7,代码来源:main.py

示例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_()
开发者ID:qwert42,项目名称:createfile,代码行数:8,代码来源:bootstrap.py

示例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_())
开发者ID:benhoff,项目名称:chrome-stream-chat,代码行数:32,代码来源:main.py

示例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_())
开发者ID:TheoDevelopers,项目名称:pyTalkManager,代码行数:31,代码来源:main.py

示例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_())
开发者ID:Jecks,项目名称:WorkoutHelper,代码行数:7,代码来源:main.py


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