def __init__(self, *args, **kwargs):
     super(Skin_MainLayout, self).__init__(*args, **kwargs)
     self.setAttribute(Qt.WA_StyledBackground, True)
     self._initLocalLanguage()
     self.setupUi(self)
     self.constants = Constants()
     self.font = ThemeManager.font()
     self._initUi()
     self._initIndex()
     self._initStyle()
 def __init__(self, *args, **kwargs):
     super(PreviewWidget, self).__init__(*args, **kwargs)
     self.setupUi(self)
     self.setAttribute(Qt.WA_StyledBackground, True)  # 支持样式
     # 图片边缘阴影效果
     effect = QGraphicsDropShadowEffect(self.labelPreviewImage)
     effect.setBlurRadius(40)
     effect.setOffset(0, 0)
     effect.setColor(Qt.gray)
     self.labelPreviewImage.setGraphicsEffect(effect)
     self.font = ThemeManager.font()
     self.buttonPreviewClose.setText('\uf00d')
     self.buttonPreviewClose.setFont(self.font)
Example #3
0
 def __init__(self, *args, **kwargs):
     super(SkinDialog, self).__init__(*args, **kwargs)
     self.setupUi(self)
     # 背景透明
     self.setAttribute(Qt.WA_TranslucentBackground, True)
     # 无边框
     self.setWindowFlags(self.windowFlags() | Qt.FramelessWindowHint)
     self.widgetBottom.setVisible(False)
     # 预览界面
     self.previewWidget = PreviewWidget(self.widgetSkinBg)
     self.previewWidget.setVisible(False)
     # 初始化信号槽
     self._initSignals()
     self.on_tabWidgetSkinMain_currentChanged(0)
     self.font = ThemeManager.font()
     self.buttonClose.setText('\uf00d')
     self.buttonClose.setFont(self.font)
     self.tabPicture.hide()
     self.tabTheme.hide()