diff options
author | Mahmoud Badri <mahmoud.badri@qt.io> | 2019-03-18 13:03:04 +0200 |
---|---|---|
committer | Mahmoud Badri <mahmoud.badri@qt.io> | 2019-03-18 13:44:56 +0000 |
commit | 838e3569632c5ab90d191abdf34ea9409961090b (patch) | |
tree | 4c39630ba63047ed4716d35d292b10f972fb19c3 | |
parent | 15720a392d9eb0c09c240fe00146a6d0fbbf9798 (diff) |
Make the menu bar and tool bars focusable by mouse click
...so the variants filtering dialog (and other dialogs) closes upon
clicking any point on the menu bar or tool bars.
- Also removed 2 useless methods.
Task-number: QT3DS-3115
Change-Id: I8ce9d0b6205567efbdcfbf7294ccc737d140f670
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r-- | src/Authoring/Studio/MainFrm.cpp | 11 | ||||
-rw-r--r-- | src/Authoring/Studio/MainFrm.h | 2 | ||||
-rw-r--r-- | src/Authoring/Studio/MainFrm.ui | 15 |
3 files changed, 15 insertions, 13 deletions
diff --git a/src/Authoring/Studio/MainFrm.cpp b/src/Authoring/Studio/MainFrm.cpp index 0b42bb56..b14b54ae 100644 --- a/src/Authoring/Studio/MainFrm.cpp +++ b/src/Authoring/Studio/MainFrm.cpp @@ -334,17 +334,6 @@ void CMainFrame::onPlaybackTimeout() } //============================================================================== - -void CMainFrame::showEvent(QShowEvent *event) -{ - QMainWindow::showEvent(event); -} - -void CMainFrame::hideEvent(QHideEvent *event) -{ - QMainWindow::hideEvent(event); -} - /** * Called when the main frame is actually created. Sets up tool bars and default * views. diff --git a/src/Authoring/Studio/MainFrm.h b/src/Authoring/Studio/MainFrm.h index 01447109..6eebd0fb 100644 --- a/src/Authoring/Studio/MainFrm.h +++ b/src/Authoring/Studio/MainFrm.h @@ -133,8 +133,6 @@ public: void onEditGroup(); void timerEvent(QTimerEvent *event) override; - void showEvent(QShowEvent *event) override; - void hideEvent(QHideEvent *event) override; void OnUpdateTimelineSetTimeBarColor(); void OnTimelineSetTimeBarColor(); diff --git a/src/Authoring/Studio/MainFrm.ui b/src/Authoring/Studio/MainFrm.ui index 3a19a548..bea7631d 100644 --- a/src/Authoring/Studio/MainFrm.ui +++ b/src/Authoring/Studio/MainFrm.ui @@ -48,6 +48,9 @@ Project palette using Import functionality.</string> <height>21</height> </rect> </property> + <property name="focusPolicy"> + <enum>Qt::ClickFocus</enum> + </property> <widget class="QMenu" name="menu_File"> <property name="title"> <string>&File</string> @@ -158,6 +161,9 @@ Project palette using Import functionality.</string> <addaction name="menu_Help"/> </widget> <widget class="QToolBar" name="toolBar"> + <property name="focusPolicy"> + <enum>Qt::ClickFocus</enum> + </property> <property name="windowTitle"> <string>Tool Bar</string> </property> @@ -184,6 +190,9 @@ Project palette using Import functionality.</string> <addaction name="action_Redo"/> </widget> <widget class="QToolBar" name="m_ClientToolsBar"> + <property name="focusPolicy"> + <enum>Qt::ClickFocus</enum> + </property> <property name="windowTitle"> <string>Client Tools</string> </property> @@ -210,6 +219,9 @@ Project palette using Import functionality.</string> <addaction name="actionAutoset_Keyframes"/> </widget> <widget class="CEditCameraBar" name="m_EditCamerasBar"> + <property name="focusPolicy"> + <enum>Qt::ClickFocus</enum> + </property> <property name="windowTitle"> <string>Edit Cameras</string> </property> @@ -238,6 +250,9 @@ Project palette using Import functionality.</string> <property name="enabled"> <bool>true</bool> </property> + <property name="focusPolicy"> + <enum>Qt::ClickFocus</enum> + </property> <property name="windowTitle"> <string>Playback</string> </property> |