title: Qt connect QAction to function with arguments
body: <p>In my Qt 5.6 program I need to connect <code>QMenu</code> Click (<code>QAction</code>) to function and provide some arguments. I can connect to function without arguments and it is working:</p>
  
  <pre><code>connect(MyAction, &amp;QAction::triggered, function);
  </code></pre>
  
  <p>But, when I'm trying to add some arguments:</p>
  
  <pre><code>connect(MyAction, &amp;QAction::triggered, function(arguments));
  </code></pre>
  
  <p>I'm getting an error:</p>
  
  <blockquote>
    <p>C2664: "QMetaObject::Connection QObject::connect(const QObject
    *,const char *,const char <em>,Qt::ConnectionType) const": can't convery arg 2 from "void (__thiscall QAction::</em> )(bool)"
    to "const char *"</p>
  </blockquote>
  
  <p>My example function:</p>
  
  <pre><code>void fuction(char x, char y, int z);
  </code></pre>
  
  <p>Thank you for any advice.</p>