sudhansu
29th March 2010, 17:31
HI All
Here is my class for systemtray icon
class MySystemTrayMessages : public QSystemTrayIcon
{
public:
MySystemTrayMessages() {ptrTrayIcon = new QSystemTrayIcon;}
QSystemTrayIcon *m_ptrTrayIcon;
DisplayMessage(QString str);
}
DisplayMessage(QString str)
{
m_ptrTrayIcon->showMessage(str, str, icon,
100000);
}
But if i call DisplayMessage from mainwindow class constructor, its displaying the bubble message in the center of my monitor.
But it should display near to the trayicon. How to solve it???
Here is my class for systemtray icon
class MySystemTrayMessages : public QSystemTrayIcon
{
public:
MySystemTrayMessages() {ptrTrayIcon = new QSystemTrayIcon;}
QSystemTrayIcon *m_ptrTrayIcon;
DisplayMessage(QString str);
}
DisplayMessage(QString str)
{
m_ptrTrayIcon->showMessage(str, str, icon,
100000);
}
But if i call DisplayMessage from mainwindow class constructor, its displaying the bubble message in the center of my monitor.
But it should display near to the trayicon. How to solve it???