<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _resetSelection(self, moveToTop=False):
 """ Reset selection. If moveToTop is True - move cursor to the top position """

        ancor, pos = self._qpart.selectedPosition
        dst = min(ancor, pos) if moveToTop else pos
        self._qpart.cursorPosition = dst