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

Qt5 Python3 conversion #11

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

DanielFaulkner
Copy link
Contributor

This commit provides Python3 and Qt5 support. Tested under Linux using Qt 5.10 and Python 3.7.6. Only 'Option 2' has been tested using the provided sample data. Other datasets and operating systems should be tested before merging into Master. But this commit can be edited to merge into a development branch if preferred. This is based on the existing work done by user mp15.

No additional improvements/fixes have been made beyond the minimum required for Qt5/Py3 support and to fix an issue with file dialogue return paths which prevented testing.

mp15 and others added 20 commits September 17, 2018 17:01
QPushButton now part of QtWidgets not QtGui
QVBoxLayout QGridLayout QPushButton QLineEdit QSpinBox all moved from QtGui to QtWidgets in Qt5
QDialogButtonBox moved from QtGui to QtWidgets in Qt5.
The QtWidgets.QFileDialog.getOpenFileName function returns 2 values. Only the first is required, the second argument being present generates an error. Fix required for Linux, untested if required on win32 systems.
Fixes to dialog window returned file paths
QGraphicsView is now within QtWidgets instead of QtGui in Qt5.
Fixes to make App file compatible with Qt5
References to qApp needs to be updated to QtWidgets.QApplication for Qt5 compatibility.
Fixes to App file for Qt5 compatibility.
Updated Qt4 reference to Qt5.
Added brackets to print statements and fixed a whitespace issue when using Python 3.
Matplotlib figure.hold function has been depreciated. This line causes the program to lock up when using Python 3. However Matplotlib defaults to false so removing this line should have no effect on the programs output.

It is possible this commit maybe applicable to branches using Python 2.
How the FileDialog module is imported has changed in Python 3. It is now imported from tkinter. The unicode function is no longer present in python 3, the easiest fix is to update calls to the unicode function with calls to the str function.
Fix a type mismatch error when using Python 3.
How the next function is called has changed in python 3. Updating it's use here to reflect that change.
Replaced references to python version 2 to reflect the updates made in this branch.
Fixes to statistics panel text
Replacing references to PySide to PySide2
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.

2 participants