jcolen / qtiPINT

QT Interface for PINT Pulsar Timing
GNU General Public License v3.0
1 stars 0 forks source link

qtiPINT assumes that PyQt4 is the PyQT installed #11

Open scottransom opened 6 years ago

scottransom commented 6 years ago

plk.py and opensomething.py both assume qt4. I think matplotlib works around this using try/excepts to check for qt4 or qt5.

scottransom commented 6 years ago

So I just noticed that the following simple change (after re-installing qtconsole via pip) makes things work for me (or at least I can the GUI to launch.

index 820c423..4022ff9 100644
--- a/qtipint/opensomething.py
+++ b/qtipint/opensomething.py
@@ -13,7 +13,7 @@ from __future__ import division
 import os, sys

 # Importing all the stuff for the IPython console widget
-from PyQt4 import QtGui, QtCore
+from qtconsole.qt import QtGui, QtCore

 # Importing all the stuff for the matplotlib widget
 import matplotlib
scottransom commented 6 years ago

Oops... after pulling your latest changes, this no longer works. I'm seeing;

  File "build/bdist.linux-x86_64/egg/qtipint/paredit.py", line 98, in addTable
AttributeError: 'QHeaderView' object has no attribute 'setResizeMode'
jcolen commented 6 years ago

That's an issue with how they changed method names between Qt4 and Qt5, I'm pretty sure. I'm working on a Tkinter version of this right now which should eliminate a lot of these install version problems. When it gets to a decent state I'll make a repo for it and link it here.

jcolen commented 6 years ago

The Tkinter interface has been added as the 'pintkinter' script in my fork of PINT, at https://github.com/jcolen/PINT