quickMove plugin fails w/ Qt5

21 views
Skip to first unread message

resi147

unread,
Jul 24, 2015, 11:27:56 AM7/24/15
to leo-editor
Hi,

was trying the head version of leo under python3/PyQt5 and had some minor issues. While I uncommented some plugins to get rid of those (was it viewrenderer?) one plugin I really
wanted to stay is quicMove (as I use it with my own GTD system in leo). I get

hook failed: after-create-leo-frame, <function onCreate at 0x7f54a8035f28>, leo.plugins.quickMove
Traceback (most recent call last):
  File "/media/sda1/home/xx/a/leo-editor/leo/core/leoPlugins.py", line 322, in callTagHandler
    result = handler(tag, keywords)
  File "/media/sda1/home/xx/a/leo-editor/leo/plugins/quickMove.py", line 168, in onCreate
    quickMove(keywords['c'])
  File "/media/sda1/home/xx/a/leo-editor/leo/plugins/quickMove.py", line 298, in __init__
    self.addButton(i['first'], i['type'], v=i['v'])
  File "/media/sda1/home/xx/a/leo-editor/leo/plugins/quickMove.py", line 385, in addButton
    rc = QtGui.QAction(txt, but)
AttributeError: 'module' object has no attribute 'QAction'

I think the QtGui.QAction is the problem as to work both qt4 and qt5 it should be something else (QWidget.QAction??.. not being a plugin developer I don't know the details)

Does it mean I cannot use the plugin under PyQt5?
Is there a list somewhere which plugins are Qt4-only, Qt5-only(probably none) and Qt-independant?

Terry Brown

unread,
Jul 24, 2015, 12:05:41 PM7/24/15
to leo-e...@googlegroups.com
On Fri, 24 Jul 2015 08:27:56 -0700 (PDT)
resi147 <sca...@yebu.de> wrote:

> I think the QtGui.QAction is the problem as to work both qt4 and qt5
> it should be something else (QWidget.QAction??.. not being a plugin
> developer I don't know the details)
>
> Does it mean I cannot use the plugin under PyQt5?
> Is there a list somewhere which plugins are Qt4-only,
> Qt5-only(probably none) and Qt-independant?

Please trying pulling again, I just updated it to work with Qt5, just
lightly tested. Fiddly change:
https://github.com/leo-editor/leo-editor/commit/bbd6415
because of the way the nicer, cleaner Qt5 style .connect() can't
magically ignore the `checked` attribute.

Cheers -Terry

resi147

unread,
Jul 24, 2015, 12:53:11 PM7/24/15
to leo-editor, terry_...@yahoo.com
Hi Terry,

hey, many thanks for this so quick(move:-) change.
From my first shot. it looks very ok!

Karl
Reply all
Reply to author
Forward
0 new messages