From: Michael B. <mi...@je...> - 2005-03-18 19:36:29
|
Hi, Paul! If you look a little further down into the file generated by pyuic, I suspect you'll find a line that begins with: def init(self): ...which is where those entries you entered into ui.h wind up when pyuic is finished doing its work. If you want to get code into MyDocWindow.__init__(), you need to enter it into the Comment field of designer's Form Settings dialog (http://www.river-bank.demon.co.uk/docs/pyqt/PyQt.html#AEN85). For instance, an entry in the Comments field like: Python: print "I'm inited!" Hope this helps! -Michael On Mar 18, 2005, at 8:43 AM, Paul Agapow wrote: > > An almost certainly basic problem (as I am just starting on PyQt): > > I'm using designer and pyuic to create my interface. My main window > class needs some initialization, so I wrote these into the ui.h file > in the approved manner: > > void MyDocWindow::init() > { > print "I'm inited!" > } > > void MyDocWindow::destroy() > { > print "I'm destroyed!" > } > > But, pyuic doesn't put the included code into the > MyDocWindow.__init__() function in the generated file. Neither is > MyDocWindow.__del__() or init() generated. Is there some obvious point > that I'm missing? > > -- > Paul-Michael Agapow (pm...@vi...) > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Pyqt-mac-list mailing list > Pyq...@li... > https://lists.sourceforge.net/lists/listinfo/pyqt-mac-list > |