I am trying to use QWizard::validateCurrentPage from PySide. My wizard class is loaded from .ui file using PySide.QtUiTools.QUiLoader
I created a function that supposed to override build-in QWizard::validateCurrentPage:
def validateDataPage(self):
return False
Now I am trying to override build-in method like this:
self.wizard = uiloader.load("registrationwizard.ui")
f = types.MethodType(validateDataPage,
self.wizard,
QtGui.QWizard)
self.wizard.validateCurrentPage = f
I see in debugger that validateCurrentPage is replaced:
self.wizard.validateCurrentPage
<bound method QWizard.validateDataPage of <PySide.QtGui.QWizard object at 0x04CC31C0>>
I can call it from debugger, but it is not called when I click "next" page.
Am I doing something wrong of it is not possible to override virtual functions when object is already constructed?