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

List:       pykde
Subject:    Re: [PyQt] QApplication.clipboard() segfault on GNU/Linux
From:       BPL <spscener84 () gmail ! com>
Date:       2019-07-24 8:27:44
Message-ID: CAAfY3fYVp8pY_QnHFoVGzZBwzCcp89e6OO=O=_PHLPJXcbpYbw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


That's right, inheritance goes like this:

QCoreApplication -> QGuiApplication -> QApplication

And clipboard is a public static member of QGuiApplication

On Wed, Jul 24, 2019 at 10:13 AM Tiger-222 <contact@tiger-222.fr> wrote:

> Oh I see what is missing from my original message :o
> This is the snippet that fails on a segfault:
>
>     >>> from PyQt5.QtCore import QCoreApplication
>     >>> from PyQt5.QtWidgets import QApplication
>     >>> with QCoreApplication([]) as app:
>     ...    print(QApplication.clipboard().text())
>
> And using QApplication.instance().clipboard().text() will return
> "AttributeError: 'QCoreApplication' object has no attribute 'clipboard'".
>
> The clipboard is only something used in the GUI world? And so it is not
> accessible via QCoreApplication?
>
>
>
> -----
> Micka=C3=ABl Schoentgen.
> [FR] Personal blog: http://www.tiger-222.fr
> --
> Sent from: http://python.6.x6.nabble.com/PyQt-f1792048.html
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

[Attachment #5 (text/html)]

<div dir="ltr">That&#39;s right, inheritance goes like this:<div><br></div><blockquote \
style="margin:0 0 0 40px;border:none;padding:0px"><div>QCoreApplication -&gt; QGuiApplication \
-&gt; QApplication  </div><div><br></div></blockquote>And clipboard is a public static member \
of QGuiApplication</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, \
Jul 24, 2019 at 10:13 AM Tiger-222 &lt;<a \
href="mailto:contact@tiger-222.fr">contact@tiger-222.fr</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">Oh I see what is missing from my original message :o<br> \
This is the snippet that fails on a segfault:<br> <br>
      &gt;&gt;&gt; from PyQt5.QtCore import QCoreApplication<br>
      &gt;&gt;&gt; from PyQt5.QtWidgets import QApplication<br>
      &gt;&gt;&gt; with QCoreApplication([]) as app:<br>
      ...      print(QApplication.clipboard().text())<br>
<br>
And using QApplication.instance().clipboard().text() will return<br>
&quot;AttributeError: &#39;QCoreApplication&#39; object has no attribute \
&#39;clipboard&#39;&quot;.<br> <br>
The clipboard is only something used in the GUI world? And so it is not<br>
accessible via QCoreApplication?<br>
<br>
<br>
<br>
-----<br>
Mickaƫl Schoentgen. <br>
[FR] Personal blog: <a href="http://www.tiger-222.fr" rel="noreferrer" \
                target="_blank">http://www.tiger-222.fr</a> <br>
--<br>
Sent from: <a href="http://python.6.x6.nabble.com/PyQt-f1792048.html" rel="noreferrer" \
target="_blank">http://python.6.x6.nabble.com/PyQt-f1792048.html</a><br> \
_______________________________________________<br> PyQt mailing list      <a \
href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a><br> \
<a href="https://www.riverbankcomputing.com/mailman/listinfo/pyqt" rel="noreferrer" \
target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><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