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


Python MainWindow.show方法代码示例

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


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

示例1: main

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
def main():
    # Load translator.
    translator = qt4.QTranslator()
    translator.load('i18n/ru_RU')

    # Create Qt application.
    app = qt4.QApplication(sys.argv)

    # Close application when all windows closed.
    app.lastWindowClosed.connect(app.quit)

    # Handle exceptions in Qt threads.
    sys.excepthook = excepthook

    # Register a signal handler to catch ctrl+C
    # TODO: Don't work
    signal.signal(signal.SIGINT, handle_int_signal)

    # Apply translator.
    app.installTranslator(translator)

    # Create main window.
    main_window = MainWindow()
    main_window.show()

    # Main loop.
    sys.exit(app.exec_())
开发者ID:rutsky,项目名称:semester10,代码行数:29,代码来源:main.py

示例2: CDATGUIApp

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
class CDATGUIApp(QtGui.QApplication):
    def __init__(self):
        super(CDATGUIApp, self).__init__(sys.argv)
        self.setApplicationName("CDAT GUI")
        self.setApplicationVersion(info.version)
        self.setWindowIcon(icon(info.icon))
        self.win = None
        self.splash = LoadingSplash()
        self.splash.show()
        self.splash.raise_()
        self.splash.activateWindow()
        self.preloadModules()

    def preloadModules(self):
        self.splash.showMessage("Loading VCS")
        import vcs
        x = vcs.init()
        x.close()
        x = None
        self.splash.showMessage("Loading CDMS2")
        import cdms2
        self.ready()

    def ready(self):
        self.win = MainWindow()
        self.splash.finish(self.win)
        self.win.show()
开发者ID:sampsonbryce,项目名称:cdatgui,代码行数:29,代码来源:application.py

示例3: main

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

    model = Model()
    main = MainWindow(model)
    main.show()

    app.exec_()
开发者ID:Foton512,项目名称:vk_auth,代码行数:10,代码来源:vk_auth.py

示例4: main

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
def main(argv=None):
    logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG)
    logging.debug('Main:Start Application')

    app = QApplication(sys.argv)
    mainWindow = MainWindow()
    mainWindow.show()
    sys.exit(app.exec_())
开发者ID:kolyanu4,项目名称:couchman,代码行数:10,代码来源:couchman.py

示例5: main

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

    main_window = MainWindow(app, ui_mainwindow, viz_config)
    main_window.show()

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

示例6: main

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

    vkRequestProcessor = VkRequestProcessor()
    model = Model(vkRequestProcessor)
    main = MainWindow(model)
    main.show()

    app.exec_()
开发者ID:Foton512,项目名称:vk_music_sampler,代码行数:11,代码来源:vk_music_sampler.py

示例7: __init__

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
class KvitterApp:
    def __init__(self):
        self.username_str = "username"
        self.password_str = "password"
        self.api = twitter.Api(username=self.username_str, password=self.password_str, input_encoding=None)
        self.main_window = MainWindow()


    def run(self):
        self.main_window.show(self.api, self.username_str)
        pass
开发者ID:johannilsson,项目名称:Kvitter,代码行数:13,代码来源:app.py

示例8: main

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
def main():
    app, client = create_nucentral_application(
        name="example",
        resource="example.rcc",
        locale=":/locale/example",
    )

    from main_window import MainWindow
    window = MainWindow(client)
    window.show()
    return app.exec_()
开发者ID:maximerobin,项目名称:Ufwi,代码行数:13,代码来源:example.py

示例9: main

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
def main(argv):
    # Create a Qt application
    app = QApplication(argv)
    app.setStyle('macintosh')

    window = MainWindow()
    window.show()

    # Enter Qt application main loop
    app.exec_()
    sys.exit()
开发者ID:cas4ey,项目名称:graph_test,代码行数:13,代码来源:main.py

示例10: main

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

    # load plugins
    if os.path.exists(PLUGIN_FILE):
        imp.load_source('hmtk.plugin', PLUGIN_FILE)

    # create Qt application

    # Claim to be QGIS2 so that used plugins that tries to access
    # QSettings will get the QGIS2 settings
    QtGui.QApplication.setApplicationName('QGIS2')
    QtGui.QApplication.setOrganizationDomain('qgis.org')

    if QtCore.QSettings().value('locale/userLocale') is None:
        QtGui.QApplication.setOrganizationDomain('QGIS')

    app = QtGui.QApplication(argv, True)

    # setup QGIS
    QgsApplication.setPrefixPath(os.environ['QGIS_PREFIX_PATH'], True)
    QgsApplication.initQgis()

    # Install a custom exception hook that prints exception into a
    # MessageBox
    sys.excepthook = excepthook

    # create main window
    wnd = MainWindow()  # classname
    wnd.show()

    if sys.platform == "darwin":
        wnd.raise_()

    if len(argv) > 1:
        wnd.change_model(CatalogueModel.from_csv_file(argv[1]))

        if len(argv) > 2:
            wnd.load_fault_source(argv[2])
    else:
        wnd.load_catalogue()

    # Connect signal for app finish
    def on_quit():
        QgsApplication.exitQgis()
        app.quit()

    app.lastWindowClosed.connect(on_quit)

    # Start the app up
    ret = app.exec_()

    sys.exit(ret)
开发者ID:gem,项目名称:qt-experiments,代码行数:54,代码来源:main.py

示例11: main

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

示例12: QApplication

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
# coding: utf8

import sys
import matplotlib
matplotlib.use("Qt5Agg", force=True)
from PyQt5.QtWidgets import QApplication
from main_window import MainWindow

import matplotlib.pyplot as plt

app = QApplication(sys.argv)
app.setApplicationName('CSM_3')
# -----------------------------------------------------#
form = MainWindow()
form.setWindowTitle('Лабораторная работа №3')
form.show()

# -----------------------------------------------------#
sys.exit(app.exec_())
开发者ID:Megalitum,项目名称:CSM_3,代码行数:21,代码来源:main.py

示例13: main

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
def main():
    app = QtGui.QApplication(sys.argv)
    widget = MainWindow()
    widget.show()
    widget.raise_()
    sys.exit(app.exec_())
开发者ID:matthew-d-jones,项目名称:mantid-algorithm-use,代码行数:8,代码来源:algorithm_stats_viewer.py

示例14: about_to_quit

# 需要导入模块: from main_window import MainWindow [as 别名]
# 或者: from main_window.MainWindow import show [as 别名]
def about_to_quit():
    main.model.dump()
    #main.engine_controller.stop_engine()
    #main.engine_controller.thread.exit()


# set app icon
app_icon = QIcon()
app_icon.addFile('res/icons_taskbar/icon16.png', QSize(16,16))
app_icon.addFile('res/icons_taskbar/icon24.png', QSize(24,24))
app_icon.addFile('res/icons_taskbar/icon32.png', QSize(32,32))
app_icon.addFile('res/icons/taskbar/icon48.png', QSize(48,48))
app_icon.addFile('res/icons_taskbar/icon256.png',QSize(256,256))
app.setWindowIcon(app_icon)

app.setActiveWindow(main)
app.aboutToQuit.connect(about_to_quit) # myExitHandler is a callable


#main.setFocus()

# raise is only needed on osx due to
# a pyqt bug
# TODO: check os platform before calling
main.raise_()
main.show()
#splash.finish(main)


sys.exit(app.exec_())
开发者ID:jasiegel4,项目名称:jerry,代码行数:32,代码来源:jerry.py

示例15: Application

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

sys.path.append('src/')
sys.path.append('src/icons/')
sys.path.append('src/libs')
sys.path.append('src/models')
sys.path.append('src/widgets')

from main_window import MainWindow
from skfc import *

# --- класс приложения (Application)
# --- здесь будем хранить глобальные переменые данные
class Application(QApplication):

    def __init__(self, args):
        QApplication.__init__(self, args)
        self.default_item_view_state = False
        self.current_skf = Skfc.DEFAULT_SKF

# ---Точка входа в программу
if __name__ == "__main__":
    codec = QTextCodec.codecForName("UTF8")
    QTextCodec.setCodecForTr(codec)
    QTextCodec.setCodecForCStrings(codec)
    QTextCodec.setCodecForLocale(codec)
    app = Application(sys.argv)
    QtGui.qApp = app
    widget = MainWindow()
    widget.show()
    app.exec_()
开发者ID:nmix,项目名称:sgo,代码行数:33,代码来源:main.py


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