song_text_widget.py 文件源码

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

项目:songscreen 作者: maccesch 项目源码 文件源码
def __init__(self, *args, **kwargs):
        super(SongTextWidget, self).__init__(*args, **kwargs)

        self.setWindowTitle(self.tr("Lyrics"))

        self.w = 1920
        self.h = 1080

        self._progress = 0.0
        # self._animated_progress = 0.0

        self.title = ""

        self._linecount = 0
        self._extra_lines_after = []
        self._first_lyrics_line_y = 0

        self._covered = True

        self.setMinimumHeight(9 * 50)
        self.setMinimumWidth(16 * 50)

        self.setSizePolicy(QSizePolicy.MinimumExpanding, QSizePolicy.Minimum)

        self.setScene(QGraphicsScene(self))
        self.setRenderHints(QPainter.HighQualityAntialiasing | QPainter.SmoothPixmapTransform)
        self.setInteractive(False)
        self.scene().setBackgroundBrush(Qt.black)
        self.setStyleSheet( "QGraphicsView { border-style: none; }" )

        self._line_height = 10
        self._document_height = 10

        self._animation = None

        self._font_size = 40
        self._line_increment = 2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号