[PyQt] Type name for a function / callable when defining a signal
Bryan A. Jones
bjones at ece.msstate.edu
Wed Aug 27 15:23:30 BST 2014
Perfect -- just what I needed. Thanks!
On Tue, Aug 26, 2014 at 5:04 PM, Baz Walter <bazwal at ftml.net> wrote:
> On 26/08/14 22:25, Bryan A. Jones wrote:
> > All,
> > A simple question -- I'd like to define a signal which expects a function
> > (or any callable) as an argument to the signal. I'm accustomed to
> > signals with other parameters, such as
> > signalName = pyqtSignal(int, str, list, dict)
> > What's the type for a function?
> > signalName = pyqtSignal(def?) # nope; not 'function' either.
> You could use the types module from the stdlib:
> signalName = pyqtSignal(types.FunctionType)
> signalName = pyqtSignal(types.MethodType)
> But simplest would be:
> signalName = pyqtSignal(object)
> Baz Walter
> PyQt mailing list PyQt at riverbankcomputing.com
Bryan A. Jones, Ph.D.
Department of Electrical and Computer Engineering
231 Simrall / PO Box 9571
Mississippi State University
Mississippi state, MS 39762
bjones AT ece DOT msstate DOT edu
Our Master, Jesus Christ, is on his way. He'll show up right on
time, his arrival guaranteed by the Blessed and Undisputed Ruler,
High King, High God.
- 1 Tim. 6:14b-15 (The Message)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt