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

ipython qt5 window/figure management #8086

Open
ocehugo opened this issue Mar 19, 2015 · 12 comments
Open

ipython qt5 window/figure management #8086

ocehugo opened this issue Mar 19, 2015 · 12 comments
Milestone

Comments

@ocehugo
Copy link

ocehugo commented Mar 19, 2015

Hello devs,

Everytime ipython is started with qt5 a floating window is initialized:
~ ipython3 --matplotlib=qt5 --pylab=qt5 --gui=qt5

Despite the fact this is annoying since I'm executing ipython inside the terminal and lose my windows focus, there are some strange behaviour for figure windows. ( not using qtconsole here).

After a new figure is created and closed, a zombie window keeps floating around.
This window doesn't have any controls and the qt5 buttons (drag, zoom, etc) are not working. This window don't have title buttons (minimize/close) and several window management commands do not work as intended (hide for example , cmd+H on osx).

In fact, for hide, the window behaves differently, going background of the next window after cmd+H is pressed ( where it should go below all windows - disappearing from the screen).

Also if I use some keyboard shortcuts, like move to next window of same group, the "zombie" window now shows the close/minimize/maximize buttons in the title bar and I can close the window. After closing this and shifting the windows again to the python process (alt+tab) the zombie window appears again, without the buttons in the title bar ( I can do this forever and the window will always popup). At least after the buttons appears I can hide it with cmd+H.

Additionally sometimes the ipython figures are lost in this limb and became zombies too (usually after interaction like zoom/pan). Some figures do not close anymore (close('all') not closing all of them) and they stay there, filling up my scarse screen space. The only way to get rid of them is to use the keyboard shortcuts (next window in group), make the buttons appears and close/hide them.

Any clues?

Operation System: OSX
ipython: 3.0.0
python: 3.4.3
qt: 5.4.1 (bottled)
pyqt: 5.4 (bottled)

@takluyver
Copy link
Member

I'm not sure it will help, but:

ipython3 --matplotlib=qt5 --pylab=qt5 --gui=qt5

You only need one of these. pylab implies matplotlib, matplotlib implies gui. You shouldn't need all three.

Also, if you're really using IPython 3.3.0, you're from the future, so this might be a bug that we haven't introduced yet. ;-)

@Carreau
Copy link
Member

Carreau commented Mar 19, 2015

Also, if you're really using IPython 3.3.0, you're from the future, so this might be a bug that we haven't introduced yet. ;-)

I believe issue 8312 will be a duplicate, and this will most likely be introduce by PR 8121.

Will investigate.

@ocehugo
Copy link
Author

ocehugo commented Mar 19, 2015

@takluyver, i know that i can only use --pylab=qt5, but i was testing to make sure I was not using a pylab initialized with different backends.
Corrected the typo on ipython version.
Sorry for the simple description but I don't know anyting about the ipython gui handling/debug.

@tacaswell
Copy link
Contributor

Does the same thing happen if you don't start with --pylab and instead use %matplotlib qt5?

Also, please don't use pylab.

@Carreau Carreau added this to the wishlist milestone Mar 20, 2015
@ocehugo
Copy link
Author

ocehugo commented Mar 23, 2015

yes @tacaswell .

How to reproduce:
ipython
%matplotlib qt5
from matplotlib import pyplot as plt
import numpy as np
plt.plot(arange(10))
figure()
plt.plot(arange(1000))
plt.close('all')

the last command apparently close the figures, but changing windows with alt+tab "resurrect" the old windows into the screen and without interaction (pan,zoom,etc) and without window buttons (maximize,minimize,close).

The only way I found to close them was the request to " move focus to next window" so the window buttons popup after it and I can click on the close button.

The only moment that qt5 do not show the last zombie window closed by close('all') or close() is at the startup:

ipython
%matplotlib qt5
pressing alt+tab after it change the focus to the "qt-python process " but no window is raised.

\bAfter creating the first figure\b, there is always a resurrected window(s) of the last plot(s) closed.

@tacaswell
Copy link
Contributor

what OS?

@ocehugo
Copy link
Author

ocehugo commented Mar 23, 2015

OSX 14.1.0.

@Carreau
Copy link
Member

Carreau commented Mar 23, 2015

OSX 14.1.0.

I think you might live in the future.

@ocehugo
Copy link
Author

ocehugo commented Mar 23, 2015

Hahaha: sorry about that. Linux way of doing things (uname -r)....

OSX Yosemite 10.10.2 (14C1510)

@ocehugo
Copy link
Author

ocehugo commented Mar 23, 2015

Another quick info: In qtconsole this do not happen.

@mail2chromium
Copy link

I have been facing the same issue, but hopefully, I have alternatives. You can use either of these combinations to perform debugging:

~$ ipython --pylab=qt5
~$ ipython3 --pylab=qt4

To get more idea you can also visit: ipython debugger is flooded with Qt errors after pylab import
.

1 similar comment
@mail2chromium
Copy link

I have been facing the same issue, but hopefully, I have alternatives. You can use either of these combinations to perform debugging:

~$ ipython --pylab=qt5
~$ ipython3 --pylab=qt4

To get more idea you can also visit: ipython debugger is flooded with Qt errors after pylab import
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants