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:
            x = 0
            y = 2
            w = self.width() - 1
            h = self.height() - 3
            palette = self.palette()
            clr = palette.color(palette.WindowText)
            clr.setAlpha(100)
            painter.setPen(QtGui.QPen(clr))

            if not self.isActive() and not self._hovered:
                painter.setBrush(palette.color(palette.Button))
            else:
                painter.setBrush(palette.color(palette.Window))

            painter.fillRect(x, y, w, h, painter.brush())
            painter.drawLine(x, y, w, y)
            painter.drawLine(w, y, w, h + 2)

            if self.parent().indexOf(self) == 0:
                painter.drawLine(x, y, x, h + 2)


            # draw the drag buttons
            if not self._locked:
                center = self._dragLabel.geometry().center()
                x = 6
                y = center.y()
                width = 3

                painter.setBrush(palette.color(palette.Window).lighter(120))

                painter.drawRect(x - width / 2, (y - width - 2) - width / 2, width, width)
                painter.drawRect(x - width / 2, y - width / 2, width, width)
                painter.drawRect(x - width / 2, (y + width + 2) - width / 2, width, width)

        finally:
            painter.end()