On Wed, 31 Jan 2007 02:08:11 +0100 David Boddie Wrote<br><br><br>>>Would that sort of represent what you're trying to do? <br>yes<br><br>Here's a screenshot of what I am working towards, using another (non-python) WYSIWIG IDE.
<br>I use it to design the layout I'm trying to construct with pyQT.<br><a href="http://www.tcapp.com/wysiwig.jpg">http://www.tcapp.com/wysiwig.jpg</a><br><br>Now- there are many more group boxes and widgets in this screenshot than my original post, but you can still see the "basic 2-column vertical layout" I described.
<br><br><br>>>If each QVBoxLayout is only going to contain a single QGroupBox, you don't need to bother with them - <br>Each group will contain more than one widget, which is why I want to put them in a group. The Group Box Title to provide visual information to the user what each group is for.
<br><br>>>just put the group boxes directly in the QHBoxLayout. In pseudocode:<br>I want a two-column view, left & right, which is why I chose 2 vertical layouts<br>(I started with a grid, but nothing would appear in it.)
<br><br>If you really do want to put two vertical layouts into a horizontal layout<br>and put a group box into each of them, you need to do something like this:<br><br>hboxLayout = QHBoxLayout()<br>hboxLayout.addLayout(leftLayout)
<br>hboxLayout.addLayout(rightLayout)<br>self.setLayout(hboxLayout)<br><br>Well after struggling with all of my other failures, this is what I came up with too.<br>But the text boxes in each vlayout are about half as wide as the main form. So I'm now trying to make them smaller.
<br><br>>>he group box is just an ordinary widget that can be used to contain other<br>>>widgets. It needs a layout inside it to organise those other widgets.<br>That's the missing piece I needed.<br><br>>>You can experiment with this sort of thing with Qt Designer.
<br>I started with designer, then quickly dropped it. It's not like the WYSIWIG IDE's I've used before.<br>I couldn't get the widgets I wanted to stay in the place I wanted them, nor stay the size I wanted. They kept resizing to the maximum width/height.
<br>When I dropped spacers onto the form, I couldn't position them nor keep them at a specific size.<br>This is the first time I've dealt with automatic layout management.<br>(as if you didn't know that already) ;-)
<br><br>I was able to do the pyuic compile, and subclass that form, but the widgets size/locations weren't what I wanted.<br>>>Also, you might want to take a look at this presentation and its accompanying<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://indico.cern.ch/contributionDisplay.py?contribId=33&sessionId=41&confId=44" target="_blank">
http://indico.cern.ch/contributionDisplay.py?contribId=33&sessionId=41&confId=44</a><br>This is great! The best docs for pyQT I've seen!<br>Can you get it on the Wiki, and/or have it included in the pyqt distribution? It would be a great help for first time pyQT users.
<br><br>BTW- on page 11- It would help me (and other newbies) if you would illustrate which widgets are parents and which are children.<br>For a newbie, the buttons are the widgets. The implication is that the Layout is a also widget- the parent widget, but the "Placing widgets in a layout" implies that the layout is not a widget. The separation between parent & child isn't immediately obvious.
<br><br><br>Thank you!<br>