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
评论列表
文章目录