Open aoloe opened 9 years ago
mrb says: the scripter should probably request scribus create the menu item for you.. otherwise you will likely make a mess in the menus as Scribus does sometimes just rebuild them all on the fly to do retranslation or dynamic menus.. if the scripter tries to add them in, they will likely get wiped out at some point.
ishitatsuyuki says on irc:
slot – the slot to connect to, either a Python callable or another bound signal.
Although PyQt5 allows any Python callable to be used as a slot when connecting signals, it is sometimes necessary to explicitly mark a Python method as being a Qt slot and to provide a C++ signature for it. PyQt5 provides thepyqtSlot() function decorator to do this.
@QuLogic any possible help you can offer here ?
Qt tut on signals and slots https://nidomiro.de/2016/12/qt-signals-and-slots-how-they-work/
in https://github.com/aoloe/scribus-plugin-scripter/blob/master/src/python/init_scripter.py#L98
is strying to connect the c++
createMenu()
slot with the pythoncreateMenu
function.since qt5 does not accept anymore connection made by passing a string, we have to correctly make the c++/qt slot available to python/pyqt.
in https://github.com/aoloe/scribus-plugin-scripter/blob/master/src/python/mikro.py#L391
correctly sees the signal as a method, but i (we) could not yet find a way to make it available as a slot inside of pyqt.
any idea?