These are chat archives for spyder-ide/public

23rd
May 2016
Thomas Robitaille
@astrofrog
May 23 2016 14:47
Hi - are any developers around?
Thomas Robitaille
@astrofrog
May 23 2016 14:59
(@ccordoba12 - could you let me know if you are around?)

I’ll put my question - just for when someone has time. Basically, I’m running into an issue with glue (which uses Qt, like Spyder) where on MacOS X and with Anaconda, the menu bar is not responsive unless I switch applications and switch back. I can reproduce the issue with a script as simple as:

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_()

However, if I try installing Spyder (with python setup.py install) into the same environment, I don’t see this issue with spyder - so I was curious as to whether you have any specific workarounds for the issue I’m seeing above?

Carlos Cordoba
@ccordoba12
May 23 2016 16:09
Hey @astrofrog, we don't do anything special about the menu bar on Mac. But we do have a qss stylesheet only for Mac, and several (hacky and not so hacky) workarounds to fix the many issue Qt has on Mac
Thomas Robitaille
@astrofrog
May 23 2016 16:10
Ok, thanks! Are the hacks centralized in one place, or in various places in the code?
I’m very confused as to why the menu bar works in your case given that it doesn’t even work in the simple example above
I think I will have to dig deeper into the spyder code to figure this one out
Carlos Cordoba
@ccordoba12
May 23 2016 16:12
You can find the mac adjustments in our codebase by looking for sys.platform == 'darwin'
Thomas Robitaille
@astrofrog
May 23 2016 16:12
Ok, thanks!
Carlos Cordoba
@ccordoba12
May 23 2016 16:13
No prob :-)