Try to import PySide6, which is the current official Qt 6 Python interface. Then, try PyQt5 if that doesn’t work. If no compatible Qt Python interface is found, use some dummy classes to allow some testing.
Classes
QAbstractItemModel(**kwargs)
QAbstractItemModel
A dummy QAbstractItemModel class to allow some testing without PyQt
QAbstractTableModel(**kwargs)
QAbstractTableModel
A dummy QAbstractTableModel class to allow some testing without PyQt
QItemDelegate()
QItemDelegate
A dummy QItemDelegate class to allow some testing without PyQt
QItemEditorCreatorBase()
QItemEditorCreatorBase
A dummy QItemEditorCreatorBase class to allow some testing without PyQt
Qt()
Qt
QtCore()
QtCore
A dummy QtCore class to allow some testing without PyQt