Migrating to qt5 QGraphicsItem problem
-
I've got existing code with class based on abstract class which inhreits QGraphicsObject. In that class I call scale method with two parameters and setAcceptsHoverEvents method. When i change my qt 4.8.4 to qt 5.0.1 i've got following errors in debugger:
@
1>src\GraphArc.cpp(14): error C3861: 'setAcceptsHoverEvents': identifier not found
1>src\GraphArc.cpp(16): error C3861: 'rotate': identifier not found
1>src\GraphArc.cpp(17): error C2660: 'QGraphicsItem::scale' : function does not take 2 arguments
@
I also instaled qt5vs addin and convert project from qmake to qtaddin project and hit widgets chebox in Qt Modules. -
@rohit1729
https://doc.qt.io/archives/qt-4.8/qgraphicsitem.html#scale
https://doc.qt.io/qt-5/qgraphicsitem.html#scale-1
qreal QGraphicsItem::scale() const
This function was introduced in Qt 4.6.
No sign
QGraphicsItem::scale
ever accepted 2 arguments, unless maybe before 4.6. Which Qt version are you migrating from?