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


Python QLabel.move方法代码示例

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


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

示例1: showSplash

# 需要导入模块: from qt import QLabel [as 别名]
# 或者: from qt.QLabel import move [as 别名]
def showSplash(splashImageName):
    """
    Function which shows a nice splash screen.

    @param splashImageName: Name of the splash screen image.
    @type splashImageName: C{unicode}
    """

    screen = QApplication.desktop().screenGeometry()

    if not _haveImagesAsModule:
        addQtImagePath(constants.LOCAL_INSTALLED_ICONS_DIRECTORY_PATH)
    dfPicture = QPixmap.fromMimeSource(splashImageName)

    dfSplash = QLabel(None, "splash",
                      Qt.WDestructiveClose | Qt.WStyle_Customize | Qt.WStyle_NoBorder |\
                      Qt.WX11BypassWM | Qt.WStyle_StaysOnTop)
    dfSplash.setFrameStyle(QFrame.WinPanel | QFrame.Raised)
    dfSplash.setPixmap(dfPicture)
    dfSplash.setCaption("DataFinder")
    dfSplash.setAutoResize(1)
    dfSplash.move(QPoint(screen.center().x() - dfSplash.width() / 2,
                         screen.center().y() - dfSplash.height() / 2))
    dfSplash.show()
    dfSplash.repaint(0)
    QApplication.flush()
    return dfSplash
开发者ID:DLR-SC,项目名称:DataFinder,代码行数:29,代码来源:utils.py


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