super(RoundShadow, self).__init__(parent)self.border_width = 8 # 设置窗⼝⽆边框和背景透明 *必须 self.setAttribute(Qt.WA_TranslucentBackground)self.setWindowFlags(Qt.FramelessWindowHint | Qt.Window)def paintEvent(self, event):# 阴影 path = QPainterPath()path.setFillRule(Qt.WindingFill)p...
m_border_width = 10 self._percent = 90 self.finished = False self.__reversed = 100. def paintEvent(self, event): # 锯齿状绘画板; painter = QtGui.QPainter() painter.begin(self) painter.setRenderHint(QtGui.QPainter.Antialiasing) width, height = self.width(), self.height() if not ...
setColor(QPalette.Disabled, QPalette.Base, QColor(68, 68, 68, 255)) dark_palette.setColor(QPalette.Disabled, QPalette.Shadow, QColor(0, 0, 0, 255)) app.setPalette(dark_palette) app.setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }") ...
( 255, 100, 20 ) else: # white Painter.setBrush(QBrush( QColor( self.MATRIX[row][row_index], self.MATRIX[row][row_index], int(self.MATRIX[row][row_index]/2 ) ) )); # QColor( 255, 100, 20 ) Painter.drawRect( self.BORDER_W+row_index*self.PX_SIZE[0], self.BORDER_W+row...
setColor(QPalette.Disabled, QPalette.Base, QColor(68, 68, 68, 255)) dark_palette.setColor(QPalette.Disabled, QPalette.Shadow, QColor(0, 0, 0, 255)) app.setPalette(dark_palette) app.setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }") ...
注册时间: 2018-11-09 已发帖子: 173 积分: 168 Re: 小智 X3 卡片电脑 运行 Python3 + PyQt5...
QtGui import QPixmap, QPainter, QColor, QPainterPath, QFont, QIcon from PyQt5.QtWidgets import QWidget, QFrame, QVBoxLayout, QHBoxLayout, QLabel from ...common.overload import singledispatchmethod from ...common.style_sheet import isDarkTheme, FluentStyleSheet from ...common.animation ...