PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 907 - pyside-uic adds MainWindow.setMenuBar(self.menubar) to the generated code under OS X
: pyside-uic adds MainWindow.setMenuBar(self.menubar) to the generated code und...
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: pyside-tools
: 1.0.4
: Macintosh Mac OS
: P3 normal
Assigned To: Lauro Moura
:
:
:
  Show dependency treegraph
 
Reported: 2011-06-29 18:19 EEST by Douglas Hammond
Modified: 2011-07-22 22:12 EEST (History)
8 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Hammond 2011-06-29 18:19:02 EEST
In the documentation under "QMenuBar on Mac OS X" it states "If you want all
windows in a Mac application to share one menu bar, you must create a menu bar
that does not have a parent."

Yet pyside-uic does not account for this and one must edit the generated file
and remove the appropriate code for the menu to work.
Comment 1 Douglas Hammond 2011-06-29 18:28:15 EEST
Workaround is to add

self.ui.menubar.setParent(None)

after

self.ui.setupUi(self)

in your widget class that uses the generated class.


In OS X though I believe the expected behavior would be not to have to do this
and pyside-uic should take this into account.
Comment 2 renato filho 2011-06-29 19:05:35 EEST
In my opinion this is a feature we can discuss on ML.
I think a good idea is create a argument to "pyside-uic" which the user can
explicitly choose this behaviour.
Comment 3 renato filho 2011-07-13 23:24:34 EEST
This is now a default behaviour on MacOS system.


fixed on pyside-tools:

commit c489162de563b73529b0e44e1df50499b39fb753
Author: Renato Filho <renato.filho@openbossa.org>
Date:   Wed Jul 13 15:19:40 2011 -0300
Comment 4 renato filho 2011-07-22 22:12:44 EEST
release 1.0.5