Пример #1
0
    def eventFilter(self, object, event):
        if object == self.btnSplit and event.type() == event.HoverEnter:
            # self.setAutoFillBackground(True)
            # self.setBackgroundRole(QPalette.Highlight)

            # self.splitter.setAutoFillBackground(True)
            # self.splitter.setStyleSheet("""QSplitter#{}{{
            #     border:1px solid darkblue;
            #     }}""".format(self.splitter.objectName()))

            self.setStyleSheet(style.mainEditorTabSS() + """
                QSplitter#{name},
                QSplitter#{name} > QWidget > QSplitter{{
                    border:3px solid {color};
                }}""".format(name=self.splitter.objectName(),
                             color=style.highlight))
        elif object == self.btnSplit and event.type() == event.HoverLeave:
            # self.setAutoFillBackground(False)
            # self.setBackgroundRole(QPalette.Window)

            # self.splitter.setStyleSheet("""QSplitter#{}{{
            #     border: 1px solid transparent;
            #     }}""".format(self.splitter.objectName()))

            self.setStyleSheet(style.mainEditorTabSS())
        return QWidget.eventFilter(self, object, event)
Пример #2
0
    def eventFilter(self, object, event):
        if object == self.btnSplit and event.type() == event.HoverEnter:
            # self.setAutoFillBackground(True)
            # self.setBackgroundRole(QPalette.Highlight)

            # self.splitter.setAutoFillBackground(True)
            # self.splitter.setStyleSheet("""QSplitter#{}{{
            #     border:1px solid darkblue;
            #     }}""".format(self.splitter.objectName()))

            self.setStyleSheet(style.mainEditorTabSS() + """
                QSplitter#{name},
                QSplitter#{name} > QWidget > QSplitter{{
                    border:3px solid {color};
                }}""".format(
                    name=self.splitter.objectName(),
                    color=style.highlight))
        elif object == self.btnSplit and event.type() == event.HoverLeave:
            # self.setAutoFillBackground(False)
            # self.setBackgroundRole(QPalette.Window)

            # self.splitter.setStyleSheet("""QSplitter#{}{{
            #     border: 1px solid transparent;
            #     }}""".format(self.splitter.objectName()))

            self.setStyleSheet(style.mainEditorTabSS())
        return QWidget.eventFilter(self, object, event)
Пример #3
0
 def updateStyleSheet(self):
     self.setStyleSheet(style.mainEditorTabSS())
     if self.secondTab:
         self.secondTab.updateStyleSheet()
Пример #4
0
 def updateStyleSheet(self):
     self.setStyleSheet(style.mainEditorTabSS())
     if self.secondTab:
         self.secondTab.updateStyleSheet()