I mean trying to override the method wouldn't work. Your method simply could never be called.
I admit I have no idea what you are trying to do, it seems obvious to try it this way:
void Cls::wheelEvent(...) {
qreal sc = item->scale();
if(wheel goes up) sc+= 0.1; // or whatever
else if(wheel goes down) sc -= 0.1;
item->setScale(qBound(0.1, sc, 2.0));
}
void Cls::wheelEvent(...) {
qreal sc = item->scale();
if(wheel goes up) sc+= 0.1; // or whatever
else if(wheel goes down) sc -= 0.1;
item->setScale(qBound(0.1, sc, 2.0));
}
To copy to clipboard, switch view to plain text mode
Bookmarks