title: How Qt::UniqueConnection works?
body: <p>I don't quite understand how the <code>Qt::UniqueConnection</code> 'flag' works.</p>
  
  <p>The <code>Qt::UniqueConnection</code> is a constant from the <a href="http://doc.qt.io/qt-4.8/qt.html#ConnectionType-enum" rel="noreferrer">enum</a> <code>Qt::ConnectionType</code> that "describes the types of connection that can be used between signals and slots".</p>
  
  <p>As explained in the documentation, the <code>Qt::UniqueConnection</code> constant is:</p>
  
  <blockquote>
    <p>Same as AutoConnection, but the connection is made only if it does not
    duplicate an existing connection. i.e., if the same signal is already
    connected to the same slot for the same pair of objects, then the
    connection will fail. This connection type was introduced in Qt 4.6.</p>
  </blockquote>
  
  <p>Based on the following example:</p>
  
  <pre><code>  for (int index = 0; index &lt; 2; ++index)
    {
        QPushButton *myButton = new QPushButton("Button", this);
        connect(myButton, SIGNAL(clicked()), this, SLOT(doSomething()), Qt::UniqueConnection);
    }
  </code></pre>
  
  <ol>
  <li><p>Will it create 2 unique connections (one for each button), based on the button memory address (I suppose)?</p></li>
  <li><p>Or will it create only one connection (the second one will fail), based on the object type (<code>QPushButton</code>) and the signals and slots used?</p></li>
  </ol>