Hi,

I am using Qt-4.7.1 on Windows XP SP3. I wrote a program which pops up a menu when the mouse touches the top of the screen. I am using the following code

Qt Code:
  1. void RDialog::slotShowMenuGlobally()
  2. {
  3. if(slotAllMenuHiden())
  4. {
  5. trayMenu->popup(QCursor::pos());
  6. trayMenu->activateWindow();
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 

If I click the mouse outside the menu immediately after opening it, the menu closes as desired. But, if I allow some time in between then menu is not closing even if I click the mouse outside the menu.

Please help me to sort this problem out.

thanks