def _create_page_control(self):
        """ Creates and connects the underlying paging widget.
        """
        if self.custom_page_control:
            control = self.custom_page_control()
        elif self.kind == 'plain':
            control = QtWidgets.QPlainTextEdit()
        elif self.kind == 'rich':
            control = QtWidgets.QTextEdit()
        control.installEventFilter(self)
        viewport = control.viewport()
        viewport.installEventFilter(self)
        control.setReadOnly(True)
        control.setUndoRedoEnabled(False)

        # Configure the scrollbar policy
        if self.scrollbar_visibility:
            scrollbar_policy = QtCore.Qt.ScrollBarAlwaysOn
        else :
            scrollbar_policy = QtCore.Qt.ScrollBarAlwaysOff

        control.setVerticalScrollBarPolicy(scrollbar_policy)
        return control
 Creates and connects the underlying paging widget.
        
angrmanagement/vendor/qtconsole/console_widget.py