def __init__(self, parent): """ :param parent: Parent widget. """ super(Banner, self).__init__(parent) # Sets the style sheet for the widget. self.setStyleSheet(""" background-color: rgb(67, 131, 168); color: rgb(255, 255, 255); border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; """) # Hide the widget by default. self.hide() self._banner_animation = QtCore.QSequentialAnimationGroup(self) self._show_time = 0
def __init__(self, parent): """ :param parent: Parent widget. """ super(Banner, self).__init__(parent) # Sets the style sheet for the widget. self.setStyleSheet(""" background-color: {highlight}; color: {text}; border-bottom-left-radius: 10px; border-bottom-right-radius: 10px; """.format( highlight=self.palette().highlight().color().name(), text=self.palette().text().color().name(), )) # Hide the widget by default. self.hide() self._banner_animation = QtCore.QSequentialAnimationGroup(self) self._show_time = 0