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

reorder qt support in kernel #560

Closed
wants to merge 2 commits into from
Closed

reorder qt support in kernel #560

wants to merge 2 commits into from

Conversation

minrk
Copy link
Member

@minrk minrk commented Jul 6, 2011

import priority:

  1. ask matplotlib (if imported) - if PyQt4 specified, use API v1
  2. ask QT_API - if pyqt specified, use API v2
  3. if nothing specified, try PyQt4 v1, fallback on PySide.

So, Qt fragmentation is apparently a total mess, but this default priority seems to make sense.

When using pylab=qt, it will respect the proposed rcParam 'backend.qt4', which could be either 'PyQt4' or 'PySide'. If it is PyQt4, then the v2 API is not set. If matplotlib is <= 1.0.1, then PyQt4 is always used.

When using gui=qt, the ETS QT_API env variable is respected. If QT_API=pyqt, then PyQt is used with API v2 for compatibility with ETS 4.0. If QT_API is not set, then the default is to use PyQt with the default API version, and if PyQt is unavailable, PySide will be tried as a fallback.

This means that if you have everything installed, QT_API is a ternary switch:

unspecified: PyQt4 v1
'pyqt' : PyQt4 v2
'pyside' : PySide

I also added a section to the reference doc, covering some of this mess.

minrk added 2 commits July 5, 2011 22:24
import priority:

1. ask matplotlib (if imported) - if PyQt4 specified, use API v1
2. ask QT_API - if pyqt specified, use API v2
3. if nothing specified, try PyQt4 v1, fallback on PySide.
QT_API now supersedes matplotlib rcParam, so the v2 API will always be
used if QT_API=pyqt (as long as matplotlib isn't too old)

Default behavior for no QT_API is unchanged
@epatters
Copy link
Contributor

epatters commented Jul 6, 2011

Thank you for your effort in working around this mess, Min.

This pull request looks good to me, although I have not tested it out myself.

@efiring
Copy link
Contributor

efiring commented Jul 7, 2011

I have merged the corresponding changes to mpl master.

@minrk
Copy link
Member Author

minrk commented Jul 7, 2011

Excellent! I'll update my matplotlib, and test a few cases before merging.

-MinRK

On Jul 7, 2011, at 11:57, efiringreply@reply.github.com wrote:

I have merged the corresponding changes to mpl master.

Reply to this email directly or view it on GitHub:
#560 (comment)

@minrk minrk closed this in 0e80619 Jul 8, 2011
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
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

Successfully merging this pull request may close these issues.

None yet

3 participants