Runs the paint event for this item.

def paintEvent(self, event):
        """
        Runs the paint event for this item.
        """
        painter = QtGui.QPainter()
        painter.begin(self)
        try:
            palette = self.palette()
            clr = palette.color(palette.WindowText)
            clr.setAlpha(100)
            painter.setPen(clr)
            painter.setBrush(palette.color(palette.Window))

            if self._tabBar.isVisible():
                painter.fillRect(0, 0, self.width() - 1, self.height() - 1, palette.color(palette.Button))
                x = y = 3
                w = self.width() - 7
                h = self.height() - 7
            else:
                x = y = 0
                w = self.width() - 1
                h = self.height() - 1

            painter.drawRect(x, y, w, h)

        finally:
            painter.end()