still confused with QTsignal
Phil Thompson
phil at river-bank.demon.co.uk
Sun Jan 20 17:25:04 EST 2002
root wrote:
>
> > Note that it isn't exactly nice to create functions with names like
> > 'print' :-).
> >
>
> The print function is only there from sheer desperation :) I just wanted to see
> if i could figure out what was going on. I have read and re-read your on line
> book and it looks to me like this should work. The 'emitworked' and 'doit'
> functions are again only there to get output. This code expects an include
> called mixer_element which contains Blackadder generated code for a widget of
> the same name. I sub-class this in mixer_sub. The widget contains lots of other
> widgets of which only a QPushButton called recButton is relevant. I am trying
> to have the function mixer.doit() called when anyof the record buttons are
> clicked. I only put in the second connect and 'emitworked' functions to prove
> that the signal is being emited.
>
> When I click any of the buttons I get 'spam' and the button number printed but
> I cant get it to call 'doit'
>
> from qt import *
> from mixer_element import **
>
> class pystudio(main_form):
> def __init__(self,parent=None):
> main_form.__init__(self)
> m=mixer(self)
That looks suspicious. Don't you mean...
self.m=mixer(self)
Phil
More information about the Python-list
mailing list