Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qt inputhook prevents modal dialog boxes from displaying #2380

Closed
mdboom opened this issue Sep 4, 2012 · 9 comments
Closed

Qt inputhook prevents modal dialog boxes from displaying #2380

mdboom opened this issue Sep 4, 2012 · 9 comments
Milestone

Comments

@mdboom
Copy link
Contributor

mdboom commented Sep 4, 2012

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
Copy link
Contributor

bfroehle commented Sep 4, 2012

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

@fperez
Copy link
Member

fperez commented Sep 4, 2012

@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
Copy link
Contributor Author

mdboom commented Sep 4, 2012

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
Copy link
Member

fperez commented Sep 21, 2012

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
Copy link
Contributor Author

mdboom commented Feb 4, 2013

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
Copy link
Member

minrk commented Feb 4, 2013

seems to Work for Me, as well.

@minrk minrk closed this as completed Jul 4, 2013
@iltommi
Copy link

iltommi commented Sep 16, 2013

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
Copy link
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
Copy link

cclaan commented May 16, 2014

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
Projects
None yet
Development

No branches or pull requests

7 participants