Hi all,
I have a widget (OpArea) that reimplements QWidget's wheelEvent handler. The parent of this widget is a scrollArea. I need the wheelEvent of OpArea to be called and under certain circumstances (no Alt modifier) the event needs to be propagated to the parent, to scroll the window.

Qt Code:
  1. void OpArea::wheelEvent(QWheelEvent *event)
  2. {
  3. if(event->modifiers() == Qt::AltModifier)
  4. {
  5. //handle the event in OpArea
  6. static int theta = 0;
  7. if (event->delta()>=0)
  8. {
  9. theta= theta +20;
  10. }
  11. else
  12. theta = theta -20;
  13.  
  14. if (theta <0)
  15. theta = 340;
  16. if (theta> 340)
  17. theta = 0;
  18. cout << theta <<endl;
  19. }
  20. else
  21. {
  22. //send to parent's wheelEvent...
  23. }
  24.  
  25. }
To copy to clipboard, switch view to plain text mode 

I think i should be using QApplication::notify() or maybe postEvent() but I am not sure exactly how.... I would appreciate any ideas, thanks