title: PyQt clipboard doesn't copy to system clipboard
body: <p>The following snippet of code doesn't seem to affect the system clipboard at all:</p>
  <pre><code>clipboard = QtGui.QApplication.clipboard()
  clipboard.setText(text)
  </code></pre>
  <p>According to the Qt documentation, this is how you copy text to clipboard,</p>
  <p>Why isn't it working?</p>
  <p>Googling turned <a href="http://www.mail-archive.com/pyqt@riverbankcomputing.com/msg17328.html" rel="noreferrer">this</a> up.</p>
  <p>It suggests adding this after the above code:</p>
  <pre><code>event = QtCore.QEvent(QtCore.QEvent.Clipboard)
  app.sendEvent(clipboard, event)
  </code></pre>
  <p>But this one behaves odd: it only copies the text to the clipboard after the program exits. Plus, some people in that link reported that this doesn't work with linux.</p>
  <h3>UPDATE:</h3>
  <p>Nevermind, I was doing something wrong else where, instead of binding the copy slot to the copy button, I connected it to the &quot;quit&quot; button.</p>