[PyQt] QSizeGrip does not work

Phil Thompson phil at riverbankcomputing.co.uk
Tue Aug 7 12:06:39 BST 2007


On Tuesday 07 August 2007 11:30 am, Giovanni Bajo wrote:
> On 8/7/2007 12:24 PM, Giovanni Bajo wrote:
> > Hi Phil,
> >
> > it looks like QSizeGrip does not work at all in Windows. Something
> > really simple like:
> >
> > ================================
> >
> >  >>> from PyQt4.Qt import *
> >  >>> app = QApplication([])
> >  >>> mw = QMainWindow()
> >  >>> QSizeGrip(mw)
> >  >>> mw.show()
> >
> > ================================
> >
> > can be used to verify that it does not work. I debugged it a little and
> > found out that QSizeEvent::winEvent() (the C++ function) is never
> > invoked. The equivalent C++ code works perfectly (and
> > QSizeEvent::winEvent() is invoked for every event, like expected).
>
> Typo: I meant "QSizeGrip::winEvent".

If you add...

%If (WS_WIN)
    bool winEvent(MSG *message, long *result);
%End

...to the protected section of QSizeGrip in  qsizegrip.sip then it should 
work.

QWizard has the same problem. They'll be fixed in tonight's snapshot.

Thanks,
Phil


More information about the PyQt mailing list