code: def adjustMinimumWidth( self ):
          
          if not self.showTitle():
              return
          
          metrics = QFontMetrics(self.font())
          width   = metrics.width(self.title()) + 20
          
          if self.minimumWidth() < width:
              self.setMinimumWidth(width)
docs: Updates the minimum width for this menu based on the font metrics \
          for its title (if its shown).  This method is called automatically \
          when the menu is shown.