And the patch....
________________________________________
From: subsurface [[email protected]] on behalf of
Sander M. Kleijwegt [[email protected]]
Sent: Tuesday, August 25, 2015 11:06
To: Subsurface Mailing List
Subject: [PATCH] Explicitly show the menubar after mainwindow
initialisation.

Hi All,

I have stumbled into a problem on my ubuntu 14.04 machine with XFCE. I am
_not_ using the global menu bar that ubuntu has standard nowadays but
instead I am using 'classical' menubars inside each application. However,
with subsurface, I found that the menubar is nowhere to be found, whereas
other Qt apps do show menubars properly. I am not very familiar with Qt but
I have discovered that at the end of the MainWindow initialisation
ui.menubar->isVisible() returns false. A simple ui.menubar->show() fixes my
problem and gives me a visible menubar.
As said, I have no idea if this is the right way(tm) to do things, so any
comments and/or help would be greatly appreciated.

I have also found ticket #833 which seems to describe the same problem I
encountered. That ticket was set to 'workasdesigned' with a note that it is
a Qt bug, but since I can circumvent it with my patch it seems the problem
is indeed with subsurface.

kind regards,
Sander Kleijwegt
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>From 64f6b7245c7581b89d7fcdbdf504cf2cce4215ce Mon Sep 17 00:00:00 2001
From: Sander Kleijwegt <[email protected]>
Date: Tue, 25 Aug 2015 10:56:07 +0200
Subject: [PATCH] Explicitly show the menubar after mainwindow initialisation.

Signed-off-by: Sander Kleijwegt <[email protected]>
---
 qt-ui/mainwindow.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 4d416d2..f15b385 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -219,6 +219,9 @@ MainWindow::MainWindow() : QMainWindow(),
 #ifndef NO_PRINTING
 	find_all_templates();
 #endif
+
+	ui.menubar->show();
+
 }
 
 MainWindow::~MainWindow()
-- 
1.9.1

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to