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

List:       pykde
Subject:    Re: [PyQt] simpler 'connect' function
From:       "Henrik Pauli" <henrik.pauli () gmail ! com>
Date:       2008-01-10 17:39:58
Message-ID: 8c0156470801100939v65634f62w2ae27b5b018a8d19 () mail ! gmail ! com
[Download RAW message or body]

I'm not sure how accepted that approach is, but I personally really
didn't like having to say QtGui and QtCore all the time, so I "from
... import *"-ed those.  This makes a connect a couple words shorter
and a lot less hideous.

On Jan 10, 2008 6:26 PM, Peter Shinners <pshinners@blizzard.com> wrote:
> I'm sure this has come up, but as I write my Pyqt code, I keep noticing
> that the QObject.connect call feels like a wart. Is there already a pyqt
> shortcut for a call like this?
>
>     QtCore.QObject.connect(myButton, QtCore.SIGNAL("clicked()"),
> onClicked)
>
> The closer I could be to something like the following, the better.
>
>     myButton.connect("clicked()", onClicked)
>
> Are there any shortcuts for wiring signals and slots I haven't noticed?
>
> _______________________________________________
> PyQt mailing list    PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://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