#NEWLINE# def mousePressEvent( self , e ) : #NEWLINE# #INDENT# ' mousePressEvent(e: QMouseEvent) -> None\n        Handle Qt mouse press event to track if we need to resize\n        either left or right mouse button is clicked\n\n        ' #NEWLINE# if ( e . col >= 0 ) : #NEWLINE# #INDENT# if ( e . button ( ) == QtCore . Qt . LeftButton ) : #NEWLINE# #INDENT# self . resizeAll = False #NEWLINE# self . dragging = True #NEWLINE# #UNINDENT# if ( ( e . button ( ) == QtCore . Qt . RightButton ) and ( not self . sheet . fitToWindow ) ) : #NEWLINE# #INDENT# self . resizeAll = True #NEWLINE# self . dragging = True #NEWLINE# #UNINDENT# self . lastPos = ( ( e . globalX ( ) - self . sheet . columnWidth ( self . col ) ) , ( e . globalY ( ) - self . sheet . rowHeight ( self . row ) ) )