Hello,
I would like to manipulate with every mousevent on tray icon (No another widget active/show)

possible ways:
1) thru installEventFitler - isnt working
2) derive my own classes (MySystemTrayIcon, and so on) - successfully running, but in my opinion isnt best way (=overload membere function QSystemTrayIconSys::winEvent)
3) thru QAbstractEventDispatcher (not tested)


Qt Code:
  1. I have trouble with this code (simplified) (1 way) - never reached
  2. bool Main::eventFilter(QObject *obj, QEvent *ev)
  3.  
  4. class Main:public QObject
  5. {
  6. ...
  7. public:
  8. bool eventFilter(QObject *obj, QEvent *ev);
  9. ...
  10. }
  11.  
  12.  
  13. Main::Main(QObject* parent):QObject(parent)
  14. {
  15. tray=new NSystemTrayIcon();
  16. ....
  17. tray->installEventFilter(this);
  18. }
  19.  
  20. bool Main::eventFilter(QObject *obj, QEvent *ev)
  21. {
  22. qDebug()<<"event reached";
  23. };
To copy to clipboard, switch view to plain text mode 

thanks for help and any ideas

Jindrich