From 67c1f69a5bfd6f7b5b697ec069795d4eea60c246 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sat, 10 Dec 2016 11:28:10 +0800 Subject: [PATCH] disable context menu on QMainWindow to prevent hiding the toolbar Signed-off-by: Le Tan --- src/vmainwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/vmainwindow.cpp b/src/vmainwindow.cpp index 2e3d314d..fa1b79b4 100644 --- a/src/vmainwindow.cpp +++ b/src/vmainwindow.cpp @@ -27,6 +27,9 @@ VMainWindow::VMainWindow(QWidget *parent) initMenuBar(); initDockWindows(); initAvatar(); + + setContextMenuPolicy(Qt::NoContextMenu); + restoreStateAndGeometry(); notebookSelector->update();