[PyQt] Unable to use qt_graphicsItem_highlightSelected and qFuzzyCompare(float, float)

Ahmet Emre Aladağ aladagemre at gmail.com
Wed Nov 10 15:05:54 GMT 2010


I'm trying to use qt_graphicsItem_highlightSelected static function in PyQt4
but I'm unable to do so. It seems like there's no binding to it. Does anyone
know how to use it to produce selection box around QGraphicsItem? Here it is
mentioned how to do it in C++ but I could not use it with PyQt4:

Then I tried to re-implement it in Python from
But I face a parameter conflict for qFuzzyCompare. I should be able to use
it like this:

qFuzzyCompare(float, float) but I can't:

    if qFuzzyCompare(self.qMax(murect.width(), murect.height()) + 1, 1):
TypeError: arguments did not match any overloaded call:
  qFuzzyCompare(QMatrix, QMatrix): argument 1 has unexpected type 'float'
  qFuzzyCompare(QMatrix4x4, QMatrix4x4): argument 1 has unexpected type
  qFuzzyCompare(QQuaternion, QQuaternion): argument 1 has unexpected type
  qFuzzyCompare(QTransform, QTransform): argument 1 has unexpected type
  qFuzzyCompare(QVector2D, QVector2D): argument 1 has unexpected type
  qFuzzyCompare(QVector3D, QVector3D): argument 1 has unexpected type
  qFuzzyCompare(QVector4D, QVector4D): argument 1 has unexpected type

Any ideas?


Ahmet Emre Aladağ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20101110/358cab31/attachment.html>

More information about the PyQt mailing list