Skip to content


Qt inputhook prevents modal dialog boxes from displaying #2380

mdboom opened this Issue · 9 comments

7 participants


We have a bug in matplotlib here:


Steps to reproduce:

Run ipython --pylab=qt. Type "plot([1,2,3])". A window is displayed. Press the save button. The save dialog will flash momentarily and then disappear.

I'm not entirely sure what's going on with this one, but it does appear to be some sort of interaction with the inputhook that ipython --pylab=qt installs.

Using git bisect, I was able to track this down to 76f9a74 in ipython. If the problem is better solved from the matplotlib end, we're happy to do it, of course, I just don't know enough about these inputhooks to even begin to arrive at a solution, unfortunately.


This is likely a duplicate of #2080 and potentially addressed in #2294.

IPython: interactive computing in Python member

@mdboom, let us know if merging #2294 helps with this bug, it will be a useful data point for us. It's a delicate PR, so we're handling it with gloves :)


It seems to be a very timing-sensitive bug -- I was able to reproduce it last week, but ever since one of my rare reboots, it seems to have resolved on my machine. There are still others who are able to reproduce it, so hopefully they can be helpful with testing.

IPython: interactive computing in Python member

Wow, this is really serious! I hadn't been using the Qt backend for a while, but not having a save window is a major issue. I can confirm that for me, master produces the problem 100% of the time, and #2294 completely fixes it. It's a bummer that #2294 is such a delicate one that we've decided to keep out of 0.13.1, because I would say that this bug is a major one. Giving people a busted matplotlib 1.2.x with Qt is a real downer...


Just following up on this. I think because #2294 is closed, we can consider this resolved. (At least it now "Works for Me" [TM])

IPython: interactive computing in Python member

seems to Work for Me, as well.

@minrk minrk closed this

Sorry to say but I think I have the same problem on osx (using macports and the latest ipython).
I've uploaded a simple test here : (a simple ./ should compile and launch ipython).

It's based upon the hybryd app found here ( to mix c++/Qt and pyqt.

In my case it opens up a window with a button that is connected to the c++ QFileDialog::getOpenFileNames method. When you press it, the window just blinks.

What do you think?
Is there any chance that the bug is still open?
I tried this on linux and didn't show the problem.

IPython: interactive computing in Python member

A comment on PR #2294 says "It seems to be a fix on Linux. On OS X, modal dialogs are still broken.", so there may well still be an issue.


I'm still having this issue on OS X - I created a minimal example where the dialog won't show up:

I modified lib/ to use event_loop.processEvents rather than event_loop.exec_() and then it works, though I don't know what other side effects that might have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.