<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
><br>
> At this stage though, I'd like to be able to return the 'handle' (I'm new<br>
> to a lot of this') of when I originally instantiated the class eg self.Rf.<br>
> self.diallist[0].objectname() only return what you assign it and not the<br>
> handle.<br>
<br>
</span>I don't follow. Looking at the output above, you get a reference to<br>
the instance of your class, i.e. to the same thing self.Rf etc. would<br>
be.<br></blockquote><div><br></div><div>I can see myself expanding the number of gui objects which then need to be laid out.  By creating list of gui object I could then use a loop to lay them out   <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> I've been searching through Object.metaclass() but am not<br>
> convinced I'm looking in the right place. self.dialist[0].__getAttr__()<br>
> seems to want a parameter but I'm not sure what to give it.<br>
<br>
</span>You probably don't want to deal with Qt metaclasses, and you don't<br>
want to call __getattr__ by hand. If anything, you'd use<br>
getattr(self, name).<br>
<br>
But either way, that sounds like an overcomplicated way. I suggest<br>
either keeping a dict of all objects:<br>
<br></blockquote><div>Thanks for the suggestion<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But let's take another step back and look at the big picture. Why do<br>
you want a list of all dials? What are you going to do with them?<br>
What is the repetitive code you want to get rid of?<br></blockquote><div><br></div><div>Dynamically generating the layout was the thinking behind this.   <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Maybe what you really should do is using Qt's signal/slot system, add<br>
some signal, and connect all dial's slots to it, and then forget about<br>
your dials<span class=""><br>
</span><span class="HOEnZb"><font color="#888888"><br>
</font></span><br>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></blockquote></div><br></div></div>