<div dir="ltr">Phil,<div><br></div><div><div class="gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1503px"><div class="gmail-" style=""><div id="gmail-:1i4" class="gmail-ii gmail-gt gmail-adO" style="direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-:1i3" class="gmail-a3s gmail-aXjCH" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;line-height:1.5"><div dir="ltr" style=""><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">A while ago I'd reported a bug related to the clipboard getting screwed up, more </div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">info about it here <a href="https://www.riverbankcomputing.com/pipermail/qscintilla/2019-June/001404.html">https://www.riverbankcomputing.com/pipermail/qscintilla/2019-June/001404.html</a></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small"><br></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">At that time you'd provided a bug fix where you'd need to create a QApplication</div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">using a context manager, that bug fix worked wonderfully. </div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small"><br></div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">That said, wouldn't be possible to provide a better solution that doesn't </div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">involve using a context manager at all? IMHO that'd be a much better </div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">clean&ideal solution, that way all existing pyqt application would benefit </div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">from the bug fix without having to change any existing production code, </div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">plus... in pyside2 the bug doesn't exist when using the normal way of </div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small">creating the QApplication instance, check this one out:</div><div style="font-family:Arial,Helvetica,sans-serif;font-size:small"><br></div><blockquote style="font-family:Arial,Helvetica,sans-serif;font-size:small;margin:0px 0px 0px 40px;border:none;padding:0px"><div>USE_PYQT = True</div><div><br></div><div>if USE_PYQT:</div><div>    from PyQt5.Qt import *</div><div>else:</div><div>    from PySide2.QtGui import *</div><div>    from PySide2.QtCore import *</div><div>    from PySide2.QtWidgets import *</div><span class="gmail-im" style="color:rgb(80,0,80)"><div><br></div><div>if __name__ == '__main__':</div><div>    app = QApplication([])</div></span><div>    w = QPlainTextEdit()</div><div>    w.setPlainText("hello world")</div><div>    w.show()</div><div>    app.exec_()</div><div><br></div></blockquote>When using pyside2 the clipboard bug doesn't exist while in pyqt right</div><div style="">now you're forced to use the context manager, otherwise you'll get the</div><div style="">bug... but ideally both should expose the same right behaviour </div><div style="">without forcing the user to use any context manager :)</div><div style=""><br></div><div style="">Thanks!</div><div style=""><img class="gmail-ajT" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif" style="background: url("https://www.gstatic.com/images/icons/material/system/1x/more_horiz_black_20dp.png") 50% 50% / 20px no-repeat; height: 11px; opacity: 0.54; width: 24px;"><br></div></div></div><div class="gmail-hi" style="font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium;border-bottom-left-radius:1px;border-bottom-right-radius:1px;padding:0px;width:auto;background:rgb(242,242,242);margin:0px"></div></div></div><br class="gmail-Apple-interchange-newline"></div></div>