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

QMenu on SystemTrayIcon is shown behind the windows taskbar on second show

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.1, 5.9.2
    • None
    • Windows 10 Pro Build 10586
      Qt 5.9.1 x64

    Description

      I have a Menu with a submenu on a QSystemTrayIcon. When I open the menu including submenu, every is shown correcty (see screenshot 'first show'). you see the menu including submenu.

      When I open the menu again, the menu is shown correctly, but the submenu is behind the taskbar of windows (see screenshot 'second show').

       

      Example code:

      #include "stdafx.h"int main( int argc, char* argv[] )
      {{{}}
      QApplication app( argc, argv );
      QMenu* MainMenu = new QMenu();
      {{ QMenu* SubMenu = new QMenu();}}
      {{ SubMenu->setTitle( "Submenu" );}}
      SubMenu->addAction( "Action 1" );
      SubMenu->addAction( "Action 2" );
      SubMenu->addAction( "Action 3" );
      MainMenu->addMenu( SubMenu );
      {{ QSystemTrayIcon OurIcon;}}
      QIcon Ic( ":/Resources/TrayIcon.png" );
      OurIcon.setIcon( Ic );
      OurIcon.setContextMenu( MainMenu );
      OurIcon.setVisible( true );return app.exec();
      {{ }}}

       

       also see QTBUG-64921

      Attachments

        1. First Show.jpg
          First Show.jpg
          11 kB
        2. Second Show.jpg
          Second Show.jpg
          11 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            owolff Oliver Wolff
            jirauser46025 user-3dfd7 (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes