Re: QApplication.clipboard() segfault on GNU/Linux

BPL <[email protected]>
Newsgroups gmane.comp.python.pyqt-pykde
Message-ID <CAAfY3fYVp8pY_QnHFoVGzZBwzCcp89e6OO=O=_PHLPJXcbpYbw@mail.gmail.com>
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 <[email protected]> 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ël Schoentgen.
> [FR] Personal blog: http://www.tiger-222.fr
> --
> Sent from: http://python.6.x6.nabble.com/PyQt-f1792048.html
> _______________________________________________
> PyQt mailing list    [email protected]
> https://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

_______________________________________________
PyQt mailing list    [email protected]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.