1
I have a class:
class MyWindow2Class(QtGui.QMainWindow, form2_class):
within the init
I have this piece of code:
self.scr = ScriptManager(self)
self.qwebview.page().mainFrame().addToJavaScriptWindowObject("obj", self.scr)
self.qwebview.load(QtCore.QUrl('pagina.html'))
self.btnEnviar.clicked.connect(self.btnEnviar_clicked)
And I have the following method:
def btnEnviar_clicked(self):
In the javascript of the page I call
obj.Enviar();
And in class Scriptmanager has a method
def Enviar(self):
How do I make the method Send in that class Scriptmanager call the btnEnviar_clicked
, when javascript calls the object..
I tested and if I give one print for example in class Send, works fine, but I haven’t figured out how to call a method within the parent class..
I tried the super(ScriptManager, self).btnEnviar_clicked()
But it makes a mistake and it doesn’t work..
Post part of the code that solved the problem, so you will be collaborating for future research!
– Junior Moreira