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

Menu on wrong Monitor

    XMLWordPrintable

    Details

    • Platform/s:
      Windows

      Description

      If a multi-monitor setup is used and an Menu of a toolbar action is opened the menu is always displayed on the primary monitor. If the window is on the secondary monitor the menu should be displayed there.

       

      Code for Example:

      #include <QAction>
      #include <QApplication>
      #include <QMainWindow>
      #include <QMenu>
      #include <QToolBar>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QMainWindow w;
      
          auto menu = new QMenu();
          menu->addAction( "Menu Action 1" );
      
          auto action = new QAction();
          action->setText( "Test Action" );
          action->setMenu( menu );  
      
          auto toolbar = new QToolBar();
          toolbar->addAction( action );   
      
          w.addToolBar( Qt::ToolBarArea::LeftToolBarArea, toolbar );    
      
          w.show();
          return a.exec();
      }

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Reporter:
              robing Robin Gutöhrlein
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes