counterlabel.py 文件源码

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

项目:pyqt5-example 作者: guinslym 项目源码 文件源码
def rescale(self):

        fm = QFontMetricsF(self._font, self)
        maxRect = fm.boundingRect(QRectF(self.rect()), Qt.AlignCenter,
                str(self._maximum))
        xscale = float(self.width())/maxRect.width()
        yscale = float(self.height())/maxRect.height()
        self._scale = min(xscale, yscale)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号