[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyQt] Help on resizing a custom widget
From:       skawaii <skawaii () gmail ! com>
Date:       2007-08-28 20:54:15
Message-ID: 12375767.post () talk ! nabble ! com
[Download RAW message or body]



David Boddie wrote:
> 
> It sounds like you have a widget in a dialog, but you're not using a
> layout manager, so nothing is resizing the widget. I wrote a tutorial
> for EuroPython last year that covered the basic principles of PyQt:
> 
> http://indico.cern.ch/contributionDisplay.py?contribId=33&sessionId=41&confId=44
> 

Thanks for the reply and for pointing me into the right direction. Your
tutorial is very good and got me started.

The problem I'm having with the built-in layout managers is that I have a
very specific layout that I want and the managers are wrecking it. Well,
they're doing what they're supposed to do. So it looks like I'll be
reimplementing QWidget::resizeEvent() and Qwidget::event(), as per
http://doc.trolltech.com/4.3.0/layout.html#manual-layout.

I have a question regarding QWidget::event(). The docs say to reimplement
event() to handle QEvent::LayoutRequest. That's straightforward, but how do
I want to handle that request? Should I be returning something there and, if
so, what do I return for a manual layout?



> Newcomers to PyQt who prefer printed materials should note that a book on
> PyQt programming will be available in the near future:
> 
> http://qtrac.eu/pyqtbook.html
> 

I did indeed notice that book in my searches...was flabbergasted when I
realized that it hadn't been published yet. :confused:

-- 
View this message in context: \
http://www.nabble.com/Help-on-resizing-a-custom-widget-tf4337591.html#a12375767 Sent \
from the PyQt mailing list archive at Nabble.com.

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic