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)
I have trouble with this code (simplified) (1 way) - never reached
{
...
public:
...
}
{
tray=new NSystemTrayIcon();
....
tray->installEventFilter(this);
}
{
qDebug()<<"event reached";
};
I have trouble with this code (simplified) (1 way) - never reached
bool Main::eventFilter(QObject *obj, QEvent *ev)
class Main:public QObject
{
...
public:
QSystemTrayIcon* tray;
bool eventFilter(QObject *obj, QEvent *ev);
...
}
Main::Main(QObject* parent):QObject(parent)
{
tray=new NSystemTrayIcon();
....
tray->installEventFilter(this);
}
bool Main::eventFilter(QObject *obj, QEvent *ev)
{
qDebug()<<"event reached";
};
To copy to clipboard, switch view to plain text mode
thanks for help and any ideas
Jindrich
Bookmarks