Skip to content

Loading…

Qt inputhook prevents modal dialog boxes from displaying #2380

Closed
mdboom opened this Issue · 9 comments

7 participants

@mdboom

We have a bug in matplotlib here:

matplotlib/matplotlib#1126

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.

@bfroehle

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

@fperez
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 :)

@mdboom

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.

@fperez
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...

@mdboom

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

@minrk
IPython: interactive computing in Python member

seems to Work for Me, as well.

@minrk minrk closed this
@iltommi

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 : http://web.luli.polytechnique.fr/Tommaso/hybrid.zip (a simple ./build.sh should compile and launch ipython).

It's based upon the hybryd app found here (http://lynxline.com/qt-python-superhybrids/) 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.

@takluyver
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.

@cclaan

I'm still having this issue on OS X - I created a minimal example where the dialog won't show up:
https://gist.github.com/cclaan/d6a8dfe9442d36c0830a

I modified lib/inputhookqt4.py 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.