counterlabel.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:examples 作者: pyqt 项目源码 文件源码
def reposition(self):

        fm = QFontMetricsF(self._font, self)
        rect = fm.boundingRect(QRectF(self.rect()), Qt.AlignCenter,
                str(self._value))
        self._xpos = -rect.width()/2.0
        self._ypos = rect.height()/2.0 - fm.descent()
        self.update()

    # Provide getter and setter methods for the font property.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号