<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br><br>--- On <b>Mon, 6/15/09, David Boddie <i><david@boddie.org.uk></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: David Boddie <david@boddie.org.uk><br>Subject: Re: [PyQt] RE: PyQt newbie needs some help with a small report designer program<br>To: pyqt@riverbankcomputing.com<br>Date: Monday, June 15, 2009, 8:36 PM<br><br><div class="plainMail">On Thu Jun 11 01:22:05 BST 2009, Lee wrote:<br><br>>> >You call its setBackgroundRole() method in its paintEvent()<br>>> > implementation. This appears to cause another paint event to be sent to<br>>> > the Resizer object, so you just keep receiving paint events.<br>>><br>>> Ok, I think that makes sense. Removing does fix the issue.<br><br>>You can call setBackgroundRole() in the
widget's __init__() method if you<br>>want.<br><br>That's actually where i moved it...<br><br>>> If the resizing of the page header pushes the lower band(s) past the<br>>> viewable area of the child window, I want the scroll bar to come up and<br>>> allow me to scroll down to make that part visible. (This last part seems to<br>>> be working.)<br><br>>So, if I've understood correctly, you want a window containing a vertical<br>>arrangement of bands, each of which can be resized.<br><br>>When a band is resized, the total amount of space taken up by the bands<br>>changes, but the size of the window itself doesn't change, so what you<br>>really want is a viewport onto a canvas or widget containing the bands.<br><br>I've been thinking more along the lines of a widget containing the bands. That's the direction I think I'll go. I haven't had any time to start trying things in code yet though.
<br><br>>> I hope this all makes sense.<br><br>>I think so.<br><br>:) Yep, I think you got it... <br><br><br>>> My reasons for doing this is I find that every now and then I have the need<br>>> for a very lightweight reporting component in python. Also, I have been<br>>> wanting to learn Qt, so I figured I would tackle both at the same time.<br><br>>I think having a project you want to build is probably the best way to<br>>learn something. This might be a bit of a tricky starting project because<br>>I'm not sure that QSplitter can do what you want out of the box.<br><br>>My initial idea was to put a QSplitter into a QScrollArea and add widgets<br>>to it, but that doesn't work as desired because QSplitter always tries to<br>>reduce the space taken up by one widget when you increase the size of<br>>another.<br><br>>David<br><br><br>Yeah, seems a bit ambition straight off, but that's ok, I
don't have any other personal projects to work on at the moment, so this will keep me honest for a while.<br><br><br>Thanks for you comments,<br>Lee<br><br><br><br><br><br><br><br>______________________________________________<br>PyQt mailing list <a ymailto="mailto:PyQt@riverbankcomputing.com" href="/mc/compose?to=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></div></blockquote></td></tr></table><br>