Thanks Dan, but I was really looking for something much more elaborate :-) The structure of the Pmw library/widgets is difficult to describe, but I found it an amazingly powerful library that allow some pretty nice (and easy) extensions once you understood how it worked. Whilst I have never delved into the inner workings, I might try some form of a basic port of the code to PyQt (assuming there is nothing else available) - I'll have to look into it, because I suspect it might be a pretty big job! It will certainly stretch my knowledge of Python! :-)<div>
<br></div><div>Thanks anyway,</div><div>Peter<br><br><div class="gmail_quote">On Mon, Sep 6, 2010 at 5:16 PM, Dan Kripac <span dir="ltr"><<a href="mailto:dankripac@gmail.com">dankripac@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Peter,<div><br></div><div>I find that a lot of my use with PyQt is composing compound widget subclasses that combine other widgets in a particular arrangement and behaviour that I need. You can easily design the way they behave in terms of signals emitted, and you can capture mouse and keyboard events simply by overriding particular methods from the base QWidget class. </div>


<div><br></div><div>Not sure if there are many pre-existing libraries of these (that I know). Perhaps because it's easy to do once you get the hang of it. For example, to make a combined label and line edit:</div><div>


<br></div><div>class myTextField(QWidget):</div><div>    def __init__(self,label="My Text Field", parent=None):</div><div>        super(myTextField,self).__init__(parent)</div><div>        layout = QHBoxLayout()</div>


<div>        self.label = QLabel(label)</div><div>        layout.addWidget( self.label )</div><div>        self.lineEdit = QLineEdit()</div><div>        layout.addWidget( self.lineEdit )</div><div>        self.setLayout( layout )</div>


<div><br></div><div>You can get much more sophisticated than this, but just a quick example really.</div><div><br></div><div>Hope this helps.</div><div><br></div><div>Dan<br><br><div class="gmail_quote"><div><div></div><div class="h5">
On 6 September 2010 02:13, Peter Milliken <span dir="ltr"><<a href="mailto:peter.milliken@gmail.com" target="_blank">peter.milliken@gmail.com</a>></span> wrote:<br>

</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class="h5">Prior to embarking on learning PyQt, I wrote my GUI applications using Tkinter and Pmw. The Pmw widget set is quite nice and provides a library of composite classes using the Tkinter widgets.<div>


<br></div><div>My question is:</div>


<div><br></div><div>Is there any (similar) composite widgets in PyQt? i.e. Pmw has the EntryField widget, which combines the (commonly used case) of a Label and a LineEdit into the one class - much more convenient than always having to specify the two entities separately, which seems to be the case with PyQt? The EntryField widget offers far more than just conveniently creating a Label and a LineEdit in the one class, it also allows definition of entry validation as well, so you can see that the composite classes provide quite a high level of functional behaviour to the user.</div>





<div><br></div><div>Pmw defines other composite widgets like: RadioSelect - which groups radio buttons (well, you have the choice of defining it to handle radio buttons, check buttons or "normal" buttons). Of course in PyQt I have found the QGroupBox class, but this only performs a (small) part of what the Pmw RadioSelect widget does.</div>





<div><br></div><div>Do such composite widgets exist? am I missing something in the PyQt documentation?</div><div><br></div><div>Thanks</div><div>Peter</div><font color="#888888"><div><br></div>
</font><br></div></div>_______________________________________________<br>
PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">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>
</blockquote></div><br></div>