[PyKDE] determining origin of resize events

Peter Bienstman Peter.Bienstman at ugent.be
Sat Oct 28 15:05:39 BST 2006


Turns out the way to solve this was by using

bool QEvent::spontaneous () const

Returns true if the event originated outside the application (a system
event); otherwise returns false.

Peter

On Thursday 26 October 2006 20:49, Matt Newell wrote:
> On Thursday 26 October 2006 11:26, Peter Bienstman wrote:
> > Hi,
> >
> > I'm wondering if it's possible to determine the origin of resize events.
> >
> > I'd like my application to behave differently when the user resizes the
> > window himself, as compared to the window getting resized because some
> > child widget needs to expand.
> >
> > Is this even possible?
>
> I'm not so sure if there is a direct way to do this, but if you install an
> event filter on the widget that is being resized, then check if the left
> mouse button is down inside that filter, that should work(assuming the user
> is resizing by dragging some handle).
>
> Matt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20061028/050c84fb/attachment.bin


More information about the PyQt mailing list