code: def get_control(self):
          
          # page_control is the widget used for paging
          page_control = self.shellwidget._page_control
          if page_control and page_control.isVisible():
              return page_control
          else:
              return self.shellwidget._control
docs: Return the text widget (or similar) to give focus to