[gnue] r9533 - trunk/gnue-forms/src/uidrivers/qt3/widgets

[email protected]
Newsgroups gmane.comp.cms.gnue.cvs
Message-ID <[email protected]>
Author: johannes
Date: 2007-04-26 09:13:11 -0500 (Thu, 26 Apr 2007)
New Revision: 9533

Modified:
   trunk/gnue-forms/src/uidrivers/qt3/widgets/menu.py
Log:
Don't search for a menu in qt.QDialog instances


Modified: trunk/gnue-forms/src/uidrivers/qt3/widgets/menu.py
===================================================================
--- trunk/gnue-forms/src/uidrivers/qt3/widgets/menu.py	2007-04-26 14:06:21 UTC (rev 9532)
+++ trunk/gnue-forms/src/uidrivers/qt3/widgets/menu.py	2007-04-26 14:13:11 UTC (rev 9533)
@@ -45,7 +45,11 @@
 
         if self._gfObject.name == '__main_menu__' \
                 and not self._form._features['GUI:MENUBAR:SUPPRESS']:
-            widget = self._uiForm.main_window.menuBar()
+            # Only access the menu bar for main forms
+            if isinstance(self._uiForm.main_window, qt.QMainWindow):
+                widget = self._uiForm.main_window.menuBar()
+            else:
+                widget = None
 
         else:
             widget = qt.QPopupMenu(event.container)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.