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


Python QtWidgets.QSplashScreen方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def __init__(self, filename=None):
        QtWidgets.QApplication.__init__(self, ['Talpa'])

        splash_img = QtGui.QPixmap(
            get_resource('talpa_splash.png'))\
            .scaled(QtCore.QSize(400, 250), QtCore.Qt.KeepAspectRatio)
        self.splash = QtWidgets.QSplashScreen(
            splash_img, QtCore.Qt.WindowStaysOnTopHint)
        self.updateSplashMessage('Talpa')
        self.splash.show()
        self.processEvents()

        self.talpa_win = TalpaMainWindow(filename=filename)

        self.talpa_win.actionExit.triggered.connect(self.exit)
        self.aboutToQuit.connect(self.talpa_win.sandbox.worker_thread.quit)
        self.aboutToQuit.connect(self.talpa_win.sandbox.deleteLater)
        self.aboutToQuit.connect(self.splash.deleteLater)
        self.aboutToQuit.connect(self.deleteLater)

        self.talpa_win.show()

        self.splash.finish(self.talpa_win)
        rc = self.exec_()
        sys.exit(rc) 
开发者ID:pyrocko,项目名称:kite,代码行数:27,代码来源:talpa.py

示例2: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def __init__(self,):
        super(SplashScreenHandler, self).__init__(level=logging.INFO)
        pixmap = QtGui.QPixmap(":qrc/splash.png")
        self.splash = QtWidgets.QSplashScreen(pixmap, QtCore.Qt.WindowStaysOnTopHint)

        # Attach as handler to the root logger
        logger = logging.getLogger()
        logger.addHandler(self)

        self.splash.showMessage("Welcome to %s %s" % (pyweed.__app_name__, pyweed.__version__))
        self.splash.show()
        logger.info("Splash screen should be visible") 
开发者ID:iris-edu,项目名称:pyweed,代码行数:14,代码来源:SplashScreenHandler.py

示例3: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def __init__(self, scene=None, import_file=None, load_file=None):
        QtWidgets.QApplication.__init__(self, ['Spool'])
        # self.setStyle('plastique')
        splash_img = QtGui.QPixmap(get_resource('spool_splash.png'))\
            .scaled(QtCore.QSize(400, 250), QtCore.Qt.KeepAspectRatio)
        self.splash = QtWidgets.QSplashScreen(
            splash_img, QtCore.Qt.WindowStaysOnTopHint)
        self.updateSplashMessage('Scene')
        self.splash.show()
        self.processEvents()

        self.spool_win = SpoolMainWindow()
        self.spool_win.sigLoadingModule.connect(self.updateSplashMessage)

        self.spool_win.actionExit.triggered.connect(self.exit)
        self.aboutToQuit.connect(self.spool_win.model.worker_thread.quit,
                                 type=QtCore.Qt.QueuedConnection)
        self.aboutToQuit.connect(self.spool_win.model.deleteLater)
        self.aboutToQuit.connect(self.splash.deleteLater)
        self.aboutToQuit.connect(self.deleteLater)

        if scene is not None:
            self.addScene(scene)
        elif import_file is not None:
            self.importScene(import_file)
        elif load_file is not None:
            self.loadScene(load_file)

        self.spool_win.show()
        self.splash.finish(self.spool_win) 
开发者ID:pyrocko,项目名称:kite,代码行数:32,代码来源:spool.py

示例4: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def __init__(self):
        QtWidgets.QSplashScreen.__init__(
            self,
            QtGui.QPixmap(os.environ["pychemqt"] + "/images/splash.jpg"))
        QtWidgets.QApplication.flush() 
开发者ID:jjgomera,项目名称:pychemqt,代码行数:7,代码来源:pychemqt.py

示例5: showMessage

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def showMessage(self, msg):
        """Procedure to update message in splash"""
        align = QtCore.Qt.Alignment(QtCore.Qt.AlignBottom |
                                    QtCore.Qt.AlignRight |
                                    QtCore.Qt.AlignAbsolute)
        color = QtGui.QColor(QtCore.Qt.white)
        QtWidgets.QSplashScreen.showMessage(self, msg, align, color)
        QtWidgets.QApplication.processEvents() 
开发者ID:jjgomera,项目名称:pychemqt,代码行数:10,代码来源:pychemqt.py

示例6: clearMessage

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def clearMessage(self):
        QtWidgets.QSplashScreen.clearMessage(self)
        QtWidgets.QApplication.processEvents() 
开发者ID:jjgomera,项目名称:pychemqt,代码行数:5,代码来源:pychemqt.py

示例7: _createSplashScreen

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def _createSplashScreen(self) -> QSplashScreen:
        return QSplashScreen(QPixmap(Resources.getPath(Resources.Images, self.getApplicationName() + ".png"))) 
开发者ID:Ultimaker,项目名称:Uranium,代码行数:4,代码来源:QtApplication.py

示例8: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def __init__(self, root, source):
        super(Application, self).__init__(sys.argv)
        self.setWindowIcon(QtGui.QIcon(ICON_PATH))

        pixmap = QtGui.QPixmap(SPLASH_PATH)
        splash = QtWidgets.QSplashScreen(pixmap)
        splash.show()
        self._splash = splash

        engine = QtQml.QQmlApplicationEngine()
        engine.objectCreated.connect(self.on_object_created)
        engine.warnings.connect(self.on_warnings)
        engine.addImportPath(QML_IMPORT_DIR)

        self._splash.showMessage("Connecting database...",
                                 QtCore.Qt.AlignBottom, QtCore.Qt.black)

        try:
            io.install()
        except IOError:
            raise  # Server refused to connect

        # Install actions
        from . import install
        install()

        self._splash.showMessage("Starting Avalon Launcher...",
                                 QtCore.Qt.AlignBottom, QtCore.Qt.black)

        terminal.init()

        controller = control.Controller(root, self)
        engine.rootContext().setContextProperty("controller", controller)
        engine.rootContext().setContextProperty("terminal", terminal.model)

        self._tray = None
        self.window = None
        self.engine = engine
        self.controller = controller

        engine.load(QtCore.QUrl.fromLocalFile(source))

        self.setQuitOnLastWindowClosed(False) 
开发者ID:getavalon,项目名称:launcher,代码行数:45,代码来源:app.py

示例9: loadProgress

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSplashScreen [as 别名]
def loadProgress(self):
        """Preimport modules to improve start speed
        Following modules are imported before splash:
        PyQt5, PyQt5.QtCore, PyQt5.QtGui, PyQt5.QtWidgets are imported before Splash.
        i18n is imported before Splash, for Splash using i18n.
        config is imported before i18n, for i18n using config.
        """
        self.setProgressText(0, 0)
        time.sleep(0.1)
        self.setProgressText(5)
        time.sleep(0.1)
        self.setProgressText(10)
        time.sleep(0.1)
        self.setProgressText(15)
        time.sleep(0.1)
        self.setProgressText(20)  # PyQt5, i18n are loaded, so before 20% do nothing
        preimport(["PyQt5.Qsci"])
        self.setProgressText(40)
        preimport(["res", "res.img_rc"])
        self.setProgressText(60)
        preimport(["ui"])
        self.setProgressText(80)
        preimport(["qss_template"])
        self.setProgressText(100)


# from PyQt5.QtCore import QDate, QDateTime
#         from PyQt5.QtGui import (QBrush, QColor, QBitmap, QIcon, QImage, QPicture, QCursor, QPainter, QKeySequence,
#                                  QFont, QPen, QMovie, qGray)
#         # (Base64, Base64url,Bigfloat,DateTimeString,Decimal,QDir,QRegExp,QRegularExpression,QTimer,QUrl)
# # QtWidgets 常用控件
# from PyQt5.QtWidgets import (
#     QAction, QActionGroup, QApplication, QBoxLayout, QCalendarWidget, QCheckBox, QColorDialog, QComboBox,
#     QDesktopWidget, QDialog, QDockWidget, QDoubleSpinBox, QFileDialog, QFontComboBox, QFontDialog, QFormLayout,
#     QFrame, QGesture, QGraphicsView, QGraphicsWidget, QGridLayout, QGroupBox, QHBoxLayout, QHeaderView,
#     QInputDialog, QItemDelegate, QKeySequenceEdit, QLCDNumber, QLabel, QLineEdit, QListView, QListWidget,
#     QListWidgetItem, QMainWindow, QMdiArea, QMdiSubWindow, QMenu, QMenuBar, QMessageBox, QOpenGLWidget,
#     QProgressBar, QProgressDialog, QPushButton, QRadioButton, QRubberBand, QScrollArea, QScrollBar, QShortcut,
#     QSizeGrip, QSlider, QSpacerItem, QSpinBox, QSplashScreen, QSplitter, QSplitterHandle, QStackedLayout,
#     QStackedWidget, QStatusBar, QStyle, QStyleFactory, QSystemTrayIcon, QTabBar, QTabWidget, QTableView,
#     QTableWidget, QTableWidgetItem, QTableWidgetSelectionRange, QTextBrowser, QTextEdit, QTimeEdit, QToolBar,
#     QToolBox, QToolButton, QToolTip, QTreeView, QTreeWidget, QTreeWidgetItem, QUndoCommand, QUndoGroup,
#     QUndoStack, QUndoView, QVBoxLayout, QWhatsThis, QWidget, QWidgetAction, QWidgetItem, qApp)

# # QtSci 所有组件
# from PyQt5 import Qsci
# from PyQt5.Qsci import (QsciLexer, QsciLexerAVS, QsciLexerBash, QsciLexerBatch, QsciLexerCMake, QsciLexerCPP,
#                         QsciLexerCSS, QsciLexerCSharp, QsciLexerCoffeeScript, QsciLexerCustom, QsciLexerD,
#                         QsciLexerDiff, QsciLexerFortran, QsciLexerFortran77, QsciLexerHTML, QsciLexerIDL,
#                         QsciLexerJSON, QsciLexerJava, QsciLexerJavaScript, QsciLexerLua, QsciLexerMakefile,
#                         QsciLexerMarkdown, QsciLexerMatlab, QsciLexerOctave, QsciLexerPO, QsciLexerPOV,
#                         QsciLexerPascal, QsciLexerPerl, QsciLexerPostScript, QsciLexerProperties,
#                         QsciLexerPython, QsciLexerRuby, QsciLexerSQL, QsciLexerSpice, QsciLexerTCL,
#                         QsciLexerTeX, QsciLexerVHDL, QsciLexerVerilog, QsciLexerXML, QsciLexerYAML, QsciMacro,
#                         QsciPrinter, QsciScintilla, QsciScintillaBase, QsciStyle, QsciStyledText, QsciAPIs) 
开发者ID:hustlei,项目名称:QssStylesheetEditor,代码行数:57,代码来源:splash.py


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