[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Feature request: 'del app' automatically
From:       BPL <spscener84 () gmail ! com>
Date:       2019-08-13 21:48:37
Message-ID: CAAfY3faRV=0sN8wz96w6MnhjpB2k7t3cYV1rZBQKQTKmW_2FTw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Oh! I didn't know this was already living in the dev branch :O , by any
chance... is it the commit `2f419c7ebaae`? If that's so, that's great news!
can't wait to try, this bug was really nasty and a lot of times when
testing apps I ended up losing a lot of clipboard information.

Anyway, considering `5.13.1` is being released
<https://wiki.qt.io/Qt_5.13_Release> in 15.08.2019 and probably an official
new wheel will be uploaded to pypi after that I think I'll wait. Wow, this
new release will contain a lot
of interesting bug fixes... really a major one in my book :)

Thanks Phil!!!

On Tue, Aug 13, 2019 at 11:10 PM Phil Thompson <phil@riverbankcomputing.com>
wrote:

> On 13/08/2019 19:33, BPL wrote:
> > Phil,
> >
> > A while ago I'd posted you a bug that happened when copying content to
> > the
> > clipboard and the information copied being lost when exiting the app...
> > at
> > that time you'd provided a fast hack that "solved" the issue, let me
> > bring
> > back your answer here at that time:
> >
> > Ok I can now reproduce the problem. It also happens with C++ when the
> >> QApplication is created on the heap and not explicitly destroyed.
> >> The workaround in your test is to 'del app' at the end of the script.
> >> Tonight's PyQt snapshot adds support for using QCoreApplication (and
> >> sub-classes) as a context manager which calls the C++ dtor when
> >> exiting
> >> the context. So...
> >> with QApplication([]) as app:
> >>      ....
> >>      app->exec()
> >> Phil
> >
> >
> > Thing is, in pyside2 you don't need to use any context manager to
> > provide
> > clipboard reliable behaviour so my question is, how hard would be for
> > you
> > to fix this issue properly without forcing the user to use this context
> > manager at all?
> >
> > Asking cos I have apps where everything is a plugin, even QApplication
> > &
> > subclasses are just plugins so I don't even know how or when they'll be
> > instantiated... being forced to use this context manager is really
> > inconvenient and ugly in many cases (not just mine) so having a
> > reliable
> > behaviour of the clipboard without these context managers like pyside2
> > would be awesome!!! :)
>
> Try the current sip and PyQt5 snapshots.
>
> Phil
>

[Attachment #5 (text/html)]

<div dir="ltr">Oh! I didn&#39;t know this was already living in the dev branch :O , \
by any chance... is it the commit `<span \
style="color:rgb(0,0,0);white-space:pre-wrap">2f419c7ebaae`? If that&#39;s so, \
that&#39;s great news! can&#39;t wait to try, this bug was really nasty and a lot of \
times when testing apps I ended up losing a lot of clipboard information. \
</span><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span \
style="color:rgb(0,0,0);white-space:pre-wrap">Anyway, considering `5.13.1` is being \
<a href="https://wiki.qt.io/Qt_5.13_Release">released</a> </span><span \
style="color:rgb(0,0,0);white-space:pre-wrap">in </span>15.08.2019 and probably an \
official new wheel will be uploaded to pypi after that I think I&#39;ll wait. Wow, \
this new release will contain a lot</div><div>of interesting bug fixes... really a \
major one in my book :)</div><div><br></div><div>Thanks Phil!!!</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 13, 2019 at 11:10 \
PM Phil Thompson &lt;<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 13/08/2019 19:33, \
BPL wrote:<br> &gt; Phil,<br>
&gt; <br>
&gt; A while ago I&#39;d posted you a bug that happened when copying content to <br>
&gt; the<br>
&gt; clipboard and the information copied being lost when exiting the app... <br>
&gt; at<br>
&gt; that time you&#39;d provided a fast hack that &quot;solved&quot; the issue, let \
me <br> &gt; bring<br>
&gt; back your answer here at that time:<br>
&gt; <br>
&gt; Ok I can now reproduce the problem. It also happens with C++ when the<br>
&gt;&gt; QApplication is created on the heap and not explicitly destroyed.<br>
&gt;&gt; The workaround in your test is to &#39;del app&#39; at the end of the \
script.<br> &gt;&gt; Tonight&#39;s PyQt snapshot adds support for using \
QCoreApplication (and<br> &gt;&gt; sub-classes) as a context manager which calls the \
C++ dtor when <br> &gt;&gt; exiting<br>
&gt;&gt; the context. So...<br>
&gt;&gt; with QApplication([]) as app:<br>
&gt;&gt;         ....<br>
&gt;&gt;         app-&gt;exec()<br>
&gt;&gt; Phil<br>
&gt; <br>
&gt; <br>
&gt; Thing is, in pyside2 you don&#39;t need to use any context manager to <br>
&gt; provide<br>
&gt; clipboard reliable behaviour so my question is, how hard would be for <br>
&gt; you<br>
&gt; to fix this issue properly without forcing the user to use this context<br>
&gt; manager at all?<br>
&gt; <br>
&gt; Asking cos I have apps where everything is a plugin, even QApplication <br>
&gt; &amp;<br>
&gt; subclasses are just plugins so I don&#39;t even know how or when they&#39;ll \
be<br> &gt; instantiated... being forced to use this context manager is really<br>
&gt; inconvenient and ugly in many cases (not just mine) so having a <br>
&gt; reliable<br>
&gt; behaviour of the clipboard without these context managers like pyside2<br>
&gt; would be awesome!!! :)<br>
<br>
Try the current sip and PyQt5 snapshots.<br>
<br>
Phil<br>
</blockquote></div>


[Attachment #6 (text/plain)]

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic