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