title: Lambdas and dynamic Menu updates?
body: <p>I am dynamically creating a menu in Qt5 using file names detected in a specific directory. I then proceed to use lambdas in order to connect those elements with an action such as</p>
  
  <pre><code>connect(test_action, &amp;QAction::triggered, [=]()
              {fileSelected( filename );}); 
  </code></pre>
  
  <p>I am not sure what do do though in the case that I update that menu. These connections I presume won't close by themselves. </p>
  
  <p>How would you suggest I tackle the issue of updating this menu at runtime?</p>