I tried the imports in a stand-alone node. They did need the version test. This is what I ended up with after several tries -
@language python import leo.plugins.qt_text as qt_text import leo.plugins.free_layout as free_layout from leo.core.leoQt import isQt6, isQt5, QtCore, QtWidgets from leo.core.leoQt import phonon, QtMultimedia, QtSvg from leo.core.leoQt import KeyboardModifier, Orientation from leo.core.leoQt import QtGui, WrapMode QActionGroup = QtGui.QActionGroup if isQt6 else QtWidgets.QActionGroup QAction = QtGui.QAction if isQt6 else QtWidgets.QAction When I adjusted the VR3 imports to match these, it ran. Note that it is only the QActionGroup and QAction that had to interrogate the qt version. Apparently they got moved from QtWidgets to QtGui. On Tuesday, July 13, 2021 at 6:54:09 PM UTC-4 Edward K. Ream wrote: > On Tue, Jul 13, 2021 at 5:15 PM [email protected] <[email protected]> > wrote: > >> OK, now works again with both pyqt5 and pyqt6. PR has been issued. >> > > Hmm. The tests on isQt6 should not be necessary. Importing QAction, > QActionGroup > from leoQt.py should just work. If they don't there is a real problem with > my code. Let me look into this. > > I don't want to approve this PR. It would just be a confusing step > backward. > > Edward > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/753b701e-f175-469a-a7a1-8b95e71634b9n%40googlegroups.com.
