As I call a method of a class of type QtGui.QMainWindow, inside another class of type QObject in python

0

I have a class:

class MyWindow2Class(QtGui.QMainWindow, form2_class):

Inside the init of it I have this code snippet:

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 the ScriptManager class has a method

def Enviar(self):

How do I make the Send method in this class ScriptManager call btnEnviar_clicked , when javascript calls the object ..

I tried and if I give a print for example in the Send class, it works fine, but I did not figure out how to call a method inside the parent class. > I tried super(ScriptManager, self).btnEnviar_clicked()
But it does not work and does not work ..

    
asked by anonymous 03.01.2016 / 22:17

1 answer

0

I was able to solve .. It was only to create the class inside the class, and use any function to start and send the parent into the subclass :) solved

    
08.01.2016 / 04:04