本文整理汇总了Python中PyQt4.QtGui.QSplashScreen.setPixmap方法的典型用法代码示例。如果您正苦于以下问题:Python QSplashScreen.setPixmap方法的具体用法?Python QSplashScreen.setPixmap怎么用?Python QSplashScreen.setPixmap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyQt4.QtGui.QSplashScreen
的用法示例。
在下文中一共展示了QSplashScreen.setPixmap方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import setPixmap [as 别名]
class SplashScreen:
def __init__(self, image_resource=":/images/splash_wait.png", text=None):
pixmap = QPixmap(image_resource)
self.splash = QSplashScreen(pixmap)
self.splash.setMask(QRegion(pixmap.mask()));
self.splash.setPixmap(pixmap);
flags = self.splash.windowFlags()
flags |= Qt.WindowStaysOnTopHint
self.splash.setWindowFlags(flags)
self._text = None
if text is not None:
self.setText(text)
def show(self):
self.splash.show()
def hide(self):
self.splash.hide()
def setText(self, text):
self._text = text
self.splash.showMessage(text, Qt.AlignBottom | Qt.AlignHCenter);
def getText(self):
return self._text
示例2: setPixmap
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import setPixmap [as 别名]
def setPixmap(self, pixmap):
self.setAttribute(Qt.WA_TranslucentBackground,
pixmap.hasAlpha() and \
is_transparency_supported())
self.__pixmap = pixmap
QSplashScreen.setPixmap(self, pixmap)
if pixmap.hasAlpha() and not is_transparency_supported():
self.setMask(pixmap.createHeuristicMask())
示例3: start_eas
# 需要导入模块: from PyQt4.QtGui import QSplashScreen [as 别名]
# 或者: from PyQt4.QtGui.QSplashScreen import setPixmap [as 别名]
def start_eas(host, client, app):
multisite_client = MultisiteClient(host, client)
# Add splash screen
pixmap = QPixmap(":/images/splash_start.png")
splash = QSplashScreen(pixmap)
splash.setMask(QRegion(pixmap.mask()))
splash.setPixmap(pixmap)
splash.show()
app.splash = splash
splash.showMessage(tr("Loading application"), Qt.AlignBottom | Qt.AlignRight)
app.processEvents()
# Load the main window
from console_edenwall import MainWindow
window = MainWindow(app, multisite_client)
window.show()
splash.finish(window)