#NEWLINE# def contextMenuEvent( self , event , widget ) : #NEWLINE# #INDENT# if ( self . port_spec is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# act = QtGui . QAction ( 'View Documentation' , widget ) #NEWLINE# act . setStatusTip ( 'View method documentation' ) #NEWLINE# QtCore . QObject . connect ( act , QtCore . SIGNAL ( 'triggered()' ) , self . view_documentation ) #NEWLINE# menu = QtGui . QMenu ( widget ) #NEWLINE# menu . addAction ( act ) #NEWLINE# menu . exec_ ( event . globalPos ( ) )