qtvcp: fix PyQt5 ≥ 5.15 and PyQt6 compatibility#3943
qtvcp: fix PyQt5 ≥ 5.15 and PyQt6 compatibility#3943bgermann wants to merge 3 commits intoLinuxCNC:masterfrom
Conversation
d4f2501 to
9201984
Compare
|
I suggest adding: on about line 171 in qtvcp.py, so we know what bindings are being used. you can force pyqt6 by adding: os.environ['QT_API'] = 'pyqt6' on about line 11 in qtvcp.py |
|
In indicatorMixin.py I get erros related to using toPointF() need to switch to QPointF instead eg: gradient = QtGui.QLinearGradient((top_bot + QtCore.QPointF(size, 0)), top_bot) |
Replace removed Qt APIs and fix strict enum type checking: - Replace QRegExp/QRegExpValidator with QRegularExpression/ QRegularExpressionValidator - Fix QDialogButtonBox.addButton() calls passing bare int 3 instead of QDialogButtonBox.ActionRole - Fix setSortIndicator() passing bare int instead of Qt.SortOrder enum - Fix QLinearGradient() rejecting QPoint arguments (requires QPointF) - Fix QVariant usage in table models: replace QVariant() returns with None, QVariant(x) returns with x, and QVariant.Double/Int type ID constants with a try/except fallback to Qt metatype integers - Add try/except fallback for QEnum import (qtpy ≥ 2.0.0) with fallback to Q_ENUM and Q_ENUMS for older versions
GCodeGraphics._hal_cleanup() never stopped the QTimer or the positionlogger background thread before HAL.exit() freed LinuxCNC's shared memory. The C logger loop continued accessing NML/status memory that had already been deallocated, causing a use-after-free segfault. Stop the Qt poll timer and call logger.stop() at the start of _hal_cleanup(), mirroring the shutdown sequence used by AXIS.
|
Okay. The toPointF() calls should be resolved. |
|
How would one go about using |
|
I do not know what is supposed to be a "pure Qt6" system but Debian has the two programs in the qt6-base-dev-tools package, built from src/tools directory of the source distribution. |
This is a follow-up on #3881