Changes between Initial Version and Version 1 of Ticket #4119, comment 8
- Timestamp:
- Oct 22, 2021, 10:00:30 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #4119, comment 8
initial v1 1 Checked in Qt changes to make gui code work with PyQt 6 . Code is still using PyQt 5. Changes mostly involved changed locations of classes (e.g. QAction is found in QtGui in Qt 6, but in QtWidgets in Qt 5), and enumeration values require specifying the enumeration name in Qt 6 (e.g. Qt.AlignmentFlag.AlignRight in Qt 6 and Qt.AlignRight in Qt 5). Also trackpad event classes and methods changed. To handle these larger change there is code that check"using_qt5" or "using_qt6" from the Qt shim module and does different things.1 Checked in Qt changes to make gui code work with PyQt 6 and PyQt 5. We are still using PyQt 5. Changes mostly involved changed locations of classes (e.g. QAction is found in !QtGui in Qt 6, but in !QtWidgets in Qt 5), and enumeration values require specifying the enumeration name in Qt 6 (e.g. Qt.AlignmentFlag.AlignRight in Qt 6 and Qt.AlignRight in Qt 5). Also trackpad event classes and methods changed. To handle these larger changes there is code that checks "using_qt5" or "using_qt6" from the Qt shim module and does different things. 2 2 3 The changes I checked in allow basic atomic structure and map display to work with PyQt 6. But there are no doubt many more enumeration values usesto fix, as well as class import locations, and other API changes that will require a methodical testing of all ChimeraX tools.3 The changes I checked in allow basic atomic structure and map display to work with PyQt 6. But there are no doubt many more enumeration values to fix, as well as class import locations, and other API changes that will require a methodical testing of all ChimeraX tools. 4 4 5 5 I checked in these partial Qt 6 fixes to allow work on the Mac ARM64 port using Qt 6.2 since Qt 5 is not available for ARM64. 6 6 7 To install PyQt 6 I added prereqs/PyQt/Makefile.pypi_qt6. It an be used by changing the prereqs/PyQt/Makefile METHOD variable from wheel to pypi_qt6. There are also app-uninstall-qt5 and app-uninstall-qt6 targets in Makefile.pypi_qt6. Although both PyQt5 and PyQt6 can be installed some tools (like the Shell / qtconsole) may directly use PyQt5 instead of our Qt shim so it is best to uninstall PyQt5 otherwise those tools may crashbecause there is no PyQt5 application running.7 To install PyQt 6 I added prereqs/PyQt/Makefile.pypi_qt6. It an be used by changing the prereqs/PyQt/Makefile METHOD variable from wheel to pypi_qt6. There are also app-uninstall-qt5 and app-uninstall-qt6 targets in Makefile.pypi_qt6. Although both PyQt5 and PyQt6 can be installed at the same time some tools (like the Shell / qtconsole) may directly use PyQt5 instead of our Qt shim so it is best to uninstall PyQt5 otherwise those tools may crash when attempting to use PyQt5 because there is no PyQt5 application running.