<div><div style="color: rgb(0, 0, 0); font-family: arial; font-size: 14px;"> Someone says it is  a bug in Chromium </div><div><a href="http://stackoverflow.com/questions/39191394/slot-of-qclipboarddatachanged-was-called-twice" _src="http://stackoverflow.com/questions/39191394/slot-of-qclipboarddatachanged-was-called-twice">http://stackoverflow.com/questions/39191394/slot-of-qclipboarddatachanged-was-called-twice</a> </div><div>I write the <span style="line-height: 1.7;">slot of QClipboard::dataChanged() as this </span><span style="line-height: 23.8px;"> </span><span style="line-height: 23.8px;">to avoid the bug,</span></div><div>    @pyqtSlot()</div><div>    def detectClipboardUrl(self):</div><div>        clipboardText = self.clipboard.text()</div><div>        if getattr(self.clipboard, 'lastClipboardUrl', None) != clipboardText:</div><div>            url = clipboardText</div><div>            setattr(self.clipboard, 'lastClipboardUrl', url)</div><div style="color: rgb(0, 0, 0); font-family: arial; font-size: 14px;"><br></div><div style="color: rgb(0, 0, 0); font-family: arial; font-size: 14px;"><br></div><div style="color: rgb(0, 0, 0); font-family: arial; font-size: 14px;"><br></div></div><!-- jy5ContentSuffix --><div>在2016年08月30 20时52分, "Chris Pezley"<chris.pezley@quantumwise.com>写道:</div><blockquote id="isReplyContent" style="padding-left:1ex; margin: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>
  
    
  
  
    <p>I made a solution for a similar problem with qscintilla - it
      should be applicable here. Take a look at the mailing list entry
      here:<a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/pipermail/qscintilla/2016-May/001134.html">https://www.riverbankcomputing.com/pipermail/qscintilla/2016-May/001134.html</a><br>
    </p><br>
    <div class="moz-cite-prefix">On 08/30/2016 02:43 PM, michael h
      wrote:<br>
    </div><blockquote cite="mid:CAD0nt=HHvH8njDg746AnUQ3vCyivmJnMQEofuE_V6QGqLM3JUw@mail.gmail.com" type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="color:rgb(0,0,0);font-family:arial;font-size:14px"><span style="color:rgb(36,39,41);font-family:Arial,Helvetica
Neue,Helvetica,sans-serif;font-size:15px;line-height:19.5px;background-color:rgb(255,255,255)"> any
                    solutions ?</span></div><div><br>
                </div></div></blockquote><div><br>
            </div><div>You could use a QTimer to delay and process only the
              last change (maybe only in the case where a duplicate is
              detected)</div><div><br>
            </div><div><br>
            </div><div><br>
            </div></div></div></div><br>
      <fieldset class="mimeAttachmentHeader"></fieldset><br>
      <pre wrap="">_______________________________________________
PyQt mailing list    <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><a class="moz-txt-link-freetext" href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
    </blockquote><br></blockquote><br><br><span title="neteasefooter"><p> </p></span>