[Interest] Issue with menubar on MacOS X 10.9 and 10.10 with Qt 4.8
Thomas Robitaille
thomas.robitaille at gmail.com
Sun Sep 13 22:45:45 CEST 2015
Hi everyone,
On MacOS X 10.9 and 10.10 I am seeing buggy behavior with the menubar
in Qt4 applications. If I run the following Python example with PyQt4:
from PyQt4.QtGui import QApplication, QMainWindow, QMenu
app = QApplication([''])
main = QMainWindow()
mbar = main.menuBar()
menu = QMenu(mbar)
menu.setTitle("&File")
mbar.addMenu(menu)
main.show()
main.raise_()
app.exec_()
Then the window appears and comes to the foreground but the menubar
does not change:
https://i.imgur.com/ouqpo0s.png [screenshot]
Note that the window is in the foreground (the three buttons top left
are colored) but the menubar is whatever it was before I launched the
application. If I then go to another application and come back, then
the menu appears.
However, on MacOS X 10.8 for example, this works correctly. Is this a
known issue? Does anyone know of any workarounds to prevent this issue
from happening?
I asked this question on the PyQt mailing list, but I was told this is
likely a Qt bug, hence why I am asking here.
Thanks!
Tom
More information about the Interest
mailing list