本文整理汇总了Python中PyQt5.QtGui.QGuiApplication.exit方法的典型用法代码示例。如果您正苦于以下问题:Python QGuiApplication.exit方法的具体用法?Python QGuiApplication.exit怎么用?Python QGuiApplication.exit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt5.QtGui.QGuiApplication
的用法示例。
在下文中一共展示了QGuiApplication.exit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Copyright
# 需要导入模块: from PyQt5.QtGui import QGuiApplication [as 别名]
# 或者: from PyQt5.QtGui.QGuiApplication import exit [as 别名]
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Daniele Simonetti
import sys
from OpenGL import GL
from PyQt5.QtCore import pyqtProperty, QCoreApplication, QObject, QUrl
from PyQt5.QtGui import QGuiApplication
from PyQt5.QtQuick import QQuickView
from PyQt5.QtQml import qmlRegisterType, QQmlComponent, QQmlEngine
if __name__ == '__main__':
# Create the application instance.
app = QGuiApplication(sys.argv)
view = QQuickView()
view.setSource(QUrl.fromLocalFile("main.qml"));
view.show();
try:
app.exec_()
except KeyboardInterrupt:
app.exit(0)