[PyQt] QDesktopServices::setUrlHandler does not have the right
types
Phil Thompson
phil at riverbankcomputing.com
Fri Oct 10 10:58:23 BST 2008
On Fri, 10 Oct 2008 02:32:23 -0700, "Erick Tryzelaar"
<idadesub at users.sourceforge.net> wrote:
> On Thu, Oct 9, 2008 at 3:56 AM, Phil Thompson
> <phil at riverbankcomputing.com> wrote:
>> No. I don't see the point.
>
> More of a consistency with the other handlers. There's also being able
> to put things in the QT mailboxes as well. If I understand pyqt4's
> QThreads, if you pass a function created in the main thread to a
> QThread, then calling that function calls the function in the
> QThread's context. However, sometimes we want to send the results
> across the boundary to the main thread's mailbox to be dealt with
> later. Or does pyqt4 do this automatically for us?
I'm not sure I understand. Allowing a method rather than an object and
method name is just a convenience, it doesn't affect the underlying
behaviour.
Had it not broken backwards compatibility I would have removed the ability
to pass a method to setUrlHandler() and stuck with the (slightly strange)
Qt API.
> Also if this is useful for pyqt4, it could be nice if we could do away
> with the Q_ARGs, as I think pyqt4 could introspect the types for us.
> Not sure how it'd deal with the return type though.
You can't get rid of Q_RETURN_ARG() and so I might choose not to remove
Q_ARG() and keep invokeMethod() as a low level method as close to the Qt
API as possible.
Phil
More information about the PyQt
mailing list