title: inner control for setting visibility of buttons
body: <p>I want to set the visibility of some buttons automatically. For example, I have some buttons and I want to set them visible or invisible when an action is triggered. I have used an action trigger signal and connected it to a slot to set the buttons visibility base on the triggered action, my code is:</p>
  
  <pre><code>void MainWindow::setBtnVisibility(bool toggled)
  {
      ui-&gt;btn1-&gt;setVisible(!toggled);
      ui-&gt;btn2-&gt;setVisible(!toggled);
  }
  </code></pre>
  
  <p>I have many actions so I should write different functions. Is there a better way to connect this function (action trigger and <code>setvisibility</code> function) together?</p>