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:

Qt Code:
  1. void Cls::wheelEvent(...) {
  2. qreal sc = item->scale();
  3. if(wheel goes up) sc+= 0.1; // or whatever
  4. else if(wheel goes down) sc -= 0.1;
  5. item->setScale(qBound(0.1, sc, 2.0));
  6. }
To copy to clipboard, switch view to plain text mode