PyQt 5 support added
Added imports for PyQt 5

best to make this back-compatible; you should import the new libraries in a try: except: and rename them as needed to the old

can you add some tests?
 I did it exactly as you said (via try except approach).

I don't now how to write tests for imports.
 their don't seem to be any tests at ALL for anything qt..

ideally install qt4 and qt5 in separate virtual environments and test

I think we need a setup of baseline tests..so this is a bit more involved

can you post what is required to run qt (e.g. if I have a blank environment, what pip needs to install)?
 I've version of PyQt5 installed from my openSUSE repos. The canonical way is on page: http://pyqt.sourceforge.net/Docs/PyQt5/installation.html, I've tried it, it works. I didn't try to install it through `pip`.
 ok, the trouble is need to do this via travis. can you investigate? (IPython I am sure has some good resources on this as well)

http://docs.travis-ci.com/user/languages/python/

essentially you can only install really really basic things via apt-get as the travis boxes are 2.7 ubuntu. I'll bet their is an easy way to install qt though.

We CAN build it as a wheel (we do this for almost all libraries), that auto installs the dependencies.
 OK, I've done little search in IPython repository and... didn't find any sign of Qt testing. Look: https://github.com/ipython/ipython/blob/master/.travis.yml (no Qt) and: https://github.com/ipython/ipython/pull/5458 (no tests).

It works, I guarantee it! :smiley: 
 ok....maybe search github/travis for other projects....surely people do this!
 >  Failed — The Travis CI build failed · Details

Hey! That's not my fault! I think master was broken before me. The error is not related to Qt at all.
 you need to rebase on master, but their are no tests for this.

So need to fix that.
 actually the 3.2 build already installs qt4, so just testing is needed (and qt4 would be straightfoward)
 We (IPython) don't run the Qt section of our tests on Travis. I think it should be possible to install PyQt\* from apt, but I don't know if it can create the widgets without an X server running. xvfb lets you run a headless X server - maybe that works on Travis.
 @takluyver thanks for the info!

we do run an `xvfb` (to test clipboard via `xsel` and such). so testing `qt` should be straightforward!
 How is it going? Is the Qt testing infrastructure ready? Should I rebase and make another pull request?
 @rominf You will need to create the testing infrastructure for this. I don't believe really any of this exists.
 I've rewritten the current qtpandas model and uploaded it to my pandas fork:
https://github.com/datalyze-solutions/pandas/tree/qt4/pandas/sandbox

Its still in sandbox. An example can be found in tests named TestApp.py. I just testet Qt4 and python2.7, Qt5 might be interesting.

Any reviews are welcome! :smiley: 

See also #8788
 closing as this would need a whole testing infrastructure.

this should prob be pulled out of pandas anyhow.
