def mousePressEvent( self, mEvent ) :
		"""Over riding the MousePress to show a menu
		"""

		self.menu.clear()
		if self.cwd.entryList().count() :
			for d in self.cwd.entryList() :
				action = self.menu.addAction( QIcon.fromTheme( "folder" ), d )
				action.triggered.connect( self.onMenuItemClicked )

		else :
			action = self.menu.addAction( "No folders" )
			action.setDisabled( True )

		if self.menu.isVisible() :
			self.setPixmap( QIcon.fromTheme( "arrow-right" ).pixmap( QSize( 16, 16 ) ) )
			self.menu.hide()

		else :
			self.setPixmap( QIcon.fromTheme( "arrow-down" ).pixmap( QSize( 16, 16 ) ) )
			self.menu.popup( self.mapToGlobal( self.frameRect().bottomLeft() ) )

		mEvent.accept()
Over riding the MousePress to show a menu
		
recipes/Python/578437_QtBreadCrumbsBar/recipe-578437.py