settingsdialog.py 文件源码

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

项目:pisi-player 作者: mthnzbk 项目源码 文件源码
def __init__(self, parent=None):
        super().__init__()
        self.parent = parent
        hlayout = QHBoxLayout()
        self.setLayout(hlayout)

        font_combobox = QFontComboBox()
        font_combobox.setEditable(False)
        font_combobox.setFixedHeight(30)
        font_combobox.setStyleSheet("QFontComboBox {background-color: white; color: black; border-radius: 3px;\
                                     border-color: lightgray; border-style: solid; border-width:2px;} \
                                     QFontComboBox::down-arrow {image: url(/usr/share/icons/breeze/actions/24/arrow-down)} \
                                     QFontComboBox::drop-down {border:none;}")
        font_combobox.setCurrentText(settings().value("Subtitle/font"))
        hlayout.addWidget(font_combobox)

        self.color_button = QPushButton()
        self.color_button.setFixedSize(30, 30)
        self.color_button.setStyleSheet("QPushButton {border: 1px solid black; border-radius: 3px; \
                                    background-color: %s; }"%(settings().value("Subtitle/color") or QColor("#ffffff")).name())
        hlayout.addWidget(self.color_button)

        self.color_button.clicked.connect(self.colorSelected)
        font_combobox.currentIndexChanged[str].connect(self.fontChanged)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号