This property holds the vertical offset of the scroll flag area
        relative to the top of the text editor.

def offset(self):
        """This property holds the vertical offset of the scroll flag area
        relative to the top of the text editor."""
        vsb = self.editor.verticalScrollBar()
        style = vsb.style()
        opt = QStyleOptionSlider()
        vsb.initStyleOption(opt)

        # Get the area in which the slider handle may move.
        groove_rect = style.subControlRect(
                QStyle.CC_ScrollBar, opt, QStyle.SC_ScrollBarGroove, self)

        return groove_rect.y()