title: PyQt: Get menu button object name instead of menu item
body: <p>I have several qpushbuttons with a menus and am trying to get the specific button that has a menu item selected. Right now using the sender function I am able to get the menu item selected but I require the actual button which holds the menu (button 1 in this case).</p>
  
  <p><a href="https://i.stack.imgur.com/ZIdlp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZIdlp.png" alt="enter image description here"></a></p>
  
  <pre><code>class MainWindow(QMainWindow):
      def __init__(self):
          QMainWindow.__init__(self)
          self.setMinimumSize(QSize(400, 400))    
          buttons= ['button1','button2','button3']
          pybutton = {}
          x=0
          t = 0
          for i in buttons:
              t = t + 100
              x+=1
              pybutton[str(x)] = QPushButton(i, self) 
              pybutton[str(x)].setObjectName('btn' + str(x))
              menu = QMenu()
              menu.addAction('item1',self.status)
              menu.addAction('item2',self.status)
              menu.addAction('item3',self.status)
              menu2 = menu.addMenu('menu2')
              menu2.addAction('item4')
              pybutton[str(x)].setMenu(menu)
              pybutton[str(x)].resize(100,100)
              pybutton[str(x)].move(400-int(t),100)
              pybutton[str(x)].setStyleSheet('QPushButton::menu-indicator { image: none; }')
          self.statusBar()
      def status(self):
          sender = self.sender()
          print('PyQt5 button click')
          self.statusBar().showMessage(sender.text() + ' was pressed')
  </code></pre>