[PyKDE] Connect syntax.
David Boddie
david at boddie.org.uk
Thu Sep 23 11:44:31 BST 2004
On Wed, 22 Sep 2004 20:11:37, Sundance wrote:
> I heard Phil Thompson said:
>
> > I have a policy of not (if at all possible) changing or "enhancing"
> > the API.
>
> C++ Qt:
>
> SomeWidget::SomeWidget () {
> // ...
> connect (this, SIGNAL("whatever()"), // <-- look!
> otherWidget, SLOT("blah()"));
> // ...
> }
Can't you achieve this by rebinding connect like you suggested before?
connect = QObject.connect
class MyWidget(QWidget):
...
> Keeping the same API as C++ Qt is in fact what I was suggesting. :) The
> Qt API is /damn/ good. In this case as in others, I'd rather see the Qt
> API adapted faithfully than bent slightly under one of Python's
> idiosyncrasies.
Maybe the harder part would be to get rid of the need to pass strings to the
SIGNAL and SLOT PyQt functions. Personally, I don't mind that restriction.
:-)
> Point taken about making connect an instance method, however.
Did I miss that part of the discussion? :-/
David
___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
More information about the PyQt
mailing list