[PyKDE] QRect contains(int x, int y, bool proper=FALSE ) broken?

Jason Stock jasonsto at spk.agilent.com
Wed Nov 14 20:45:42 GMT 2001


When using the overloaded QRect function "contains(int x, int y, bool
proper=FALSE )" I get the error: "TypeError: Argument 1 of
QRect.contains() has an invalid type"  However, the contains function
with the prototype bool QRect::contains ( const QPoint & p, bool
proper=FALSE ) const works fine.  Here is a simple test case that
demonstrates the behavior, and I doing something wrong?

#!/usr/bin/python
import sys
from qt import *

def main(args):
    r = QRect()
    if r.contains(1,1):
        print "Point is in Rect"
    else:
        print "Point is not in Rect"


if __name__=="__main__":
    main(sys.argv)


I am using qt2.3.1 and pyqt2.5 on Linux Redhat 7.2  Just thought I would
let you know what I found.

-Jason Stock





More information about the PyQt mailing list