On Thursday, June 12, 2014 11:17:32 AM UTC-5, Edward K. Ream wrote:
> As of rev d8f026289718... Leo's core loads with PyQt5.
> Next, I'll do the renaming mentioned above. To repeat, in the Qt4 world
both QtGui and QtWidgets mean the QtGui module.
Done at rev 3ed6491149db...
**Important**: from now on, you must use the PyQt5 names for modules even
if you are using PyQt4.
This shouldn't be odious: just use QtWidgets.aWidget instead of
QtGui.aWidget.
The recommended way to import Qt is as follows::
try:
import PyQt5.QtCore as QtCore
import PyQt5.QtGui as QtGui
from PyQt5 import QtWidgets
isQt5 = True
except ImportError:
import PyQt4.QtCore as QtCore
import PyQt4.QtGui as QtGui
QtWidgets = QtGui
isQt5 = False
It's also fine to use this style of imports::
from PyQt5 import QtWidgets # etc.
The last task will be hook up connections again when using Qt5. At
present, they are disabled with the isQt5 switch. Not sure what is going
on. Should be no big deal.
Oh yes, several plugins use Qt: I'll be munging them as well.
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.