Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-13032

CLONE -QMenu exec()'ed on QSystemTrayIcon::Trigger won't disappear (Windows-only)

    XMLWordPrintable

Details

    Description

      To reproduce, replace the Window::iconActivated() function in the desktop/systray Qt example with the following code:

      ////////////////////////////////////////////////
      void Window::iconActivated(QSystemTrayIcon::ActivationReason reason)
      {
      switch (reason)
      {
      case QSystemTrayIcon::Trigger:

      { QMenu menu; menu.addAction("Test"); menu.exec(QCursor::pos()); }

      break;
      case QSystemTrayIcon::DoubleClick:
      iconComboBox->setCurrentIndex((iconComboBox->currentIndex() + 1)
      % iconComboBox->count());
      break;
      case QSystemTrayIcon::MiddleClick:
      showMessage();
      break;
      default:
      ;
      }
      }
      ////////////////////////////////////////////////

      Then left-click on the icon in the system tray. A menu will come up, but clicking anywhere else on the desktop won't make it disappear. Context menus work fine though. This issue happens only on Windows (tested on XP).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            bachewii Jens
            swtet2003 Tony Thompson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes