title: Connect QML signal to C++11 lambda slot (Qt 5)
body: <p>Connecting a QML signal to a regular C++ slot is easy:</p>
  
  <pre><code>// QML
  Rectangle { signal foo(); }
  
  // C++ old-style
  QObject::connect(some_qml_container, SIGNAL(foo()), some_qobject, SLOT(fooSlot()); // works!
  </code></pre>
  
  <p>However, no matter what I try, I cannot seem to be able to connect to a C++11 lambda function slot.</p>
  
  <pre><code>// C++11
  QObject::connect(some_qml_container, SIGNAL(foo()), [=]() { /* response */ }); // fails...
  QObject::connect(some_qml_container, "foo()", [=]() { /* response */ }); // fails...
  </code></pre>
  
  <p>Both attempts fail with a function signature error (no QObject::connect overload can accept these parameters). However, the Qt 5 documentation implies that this should be possible.</p>
  
  <p>Unfortunately, Qt 5 examples always connect a C++ signal to a C++ lambda slot:</p>
  
  <pre><code>// C++11
  QObject::connect(some_qml_container, &amp;QMLContainer::foo, [=]() { /* response */ }); // works!
  </code></pre>
  
  <p>This syntax cannot work for a QML signal, as the QMLContainer::foo signature is not known at compile-time (and declaring QMLContainer::foo by hand defeats the purpose of using QML in the first place.)</p>
  
  <p>Is what I'm trying to do possible? If so, what is the correct syntax for the QObject::connect call?</p>