title: Qt QSystemTrayIcon change menu items
body: <p>I am using Pyqt however c++ code is fine. I am trying to change a menu item in QSystemTrayIcon using the QT framework in Linux (Ubuntu 11.10). Currently I have tried to reset the QMenu that I initially set:</p>
  
  <pre><code>self.tray = QSystemTrayIcon()
  m = QMenu()
  m.addAction('First')
  m.addAction('Second')
  tray.setContextMenu(m)
  </code></pre>
  
  <p>I place this in my class and make tray a class variable. I was thinking that if I just change the tray to set a new menu it would update:</p>
  
  <pre><code>new_m = QMenu()
  new_m.addAction('First')
  new_m.addAction('Third')
  self.tray.setContextMenu(new_m)
  </code></pre>
  
  <p>However that doesn't work and the tray menu is still the same as it was initially made. How could I be able to rebuild the menu to change it?</p>