code: def resizeEvent(self, event):
          
          super(XPushButton, self).resizeEvent(event)
          
          if self._richTextLabel:
              self._richTextLabel.resize(event.size())
docs: Overloads the resize event to auto-resize the rich text label to the
          size of this QPushButton.
          
          :param      event | <QResizeEvent>