[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
Hi,
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:
http://www.qtforum.org/post/109281/custom-qgraphicsitem-doesn-t-get-dotted-selection-rectangle.html#post109281
Then I tried to re-implement it in Python from
http://websvn.kde.org/branches/qt/4.4/src/gui/graphicsview/qgraphicsitem.cpp?view=markup.
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
'float'
qFuzzyCompare(QQuaternion, QQuaternion): argument 1 has unexpected type
'float'
qFuzzyCompare(QTransform, QTransform): argument 1 has unexpected type
'float'
qFuzzyCompare(QVector2D, QVector2D): argument 1 has unexpected type
'float'
qFuzzyCompare(QVector3D, QVector3D): argument 1 has unexpected type
'float'
qFuzzyCompare(QVector4D, QVector4D): argument 1 has unexpected type
'float'
Any ideas?
Thanks,
--
Ahmet Emre Aladağ
http://www.emrealadag.com
-------------- 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