VirtualBox

Changeset 11549 in vbox


Ignore:
Timestamp:
Aug 21, 2008 4:59:01 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
35130
Message:

Fe/Qt4: Fixing issue when Host+Home key combination is not work (should invoke main-menu).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r10922 r11549  
    14501450                    else if (ke->key() == Qt::Key_Home)
    14511451                    {
    1452                         /* activate the main menu */
     1452                        /* Activate the main menu */
    14531453                        if (mMainWnd->isTrueSeamless() || mMainWnd->isTrueFullscreen())
    14541454                            mMainWnd->popupMainMenu (mMouseCaptured);
    14551455                        else
    1456                             mMainWnd->menuBar()->setFocus();
     1456                        {
     1457                            /* In Qt4 it is not enough to just set the focus to
     1458                             * menu-bar. So to get the menu-bar we have to send
     1459                             * Qt::Key_Alt press/release events directly. */
     1460                            QKeyEvent e1 (QEvent::KeyPress, Qt::Key_Alt,
     1461                                          Qt::NoModifier);
     1462                            QKeyEvent e2 (QEvent::KeyRelease, Qt::Key_Alt,
     1463                                          Qt::NoModifier);
     1464                            QApplication::sendEvent (mMainWnd->menuBar(), &e1);
     1465                            QApplication::sendEvent (mMainWnd->menuBar(), &e2);
     1466                        }
    14571467                    }
    14581468                    else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette