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.



  • I am sure you found it, but in case someone else (like myself) runs into the problem of not finding setAcceptsHoverEvents(), the function has been deprecated, the new function is: setAcceptHoverEvents(). The simply dropped the s on Accept!



  • Also, rotate() was deprecated and changed to setRotation()


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.