[PyQt] QQuickView connect closing signal
Phil Thompson
phil at riverbankcomputing.com
Fri Dec 4 18:54:19 GMT 2015
On 4 Dec 2015, at 6:39 p.m., Jérôme Godbout <jerome at bodycad.com> wrote:
>
> Hi,
> I'm trying to connect the QQuickView::closing(QQuickCloseEvent*) signal to a python slot, but cannot figure out how to be able to use the QQuickCloseEvent, nor import it?!?
>
> TypeError: C++ type 'QQuickCloseEvent*' is not supported as a signal argument type
>
> Is it possible to connect to event handler or how do I import this into Python (It's declared into QQuickWindow, which I import.
>
> from PyQt5.QtQuick import QQuickView, QQuickWindow
Although closing() seems to be part of the public API, QQuickCloseEvent isn't. I'll try and clarify.
> Another question, can I connect a signal to an handler with less arguments? let say I drop the event into the handler like so:
>
> def onClosing(self):
> # do stuff here
Try it.
Phil
More information about the PyQt
mailing list