I 'm trying to convert a c++ class to python class.
My class 's c++ code (in epnccombomodel.cpp file):
What exactly is it saying?
Create a Class deriving from QObject? (child of QObject)
And variable 'parent' equals to this QObject?
My class 's c++ code (in epnccombomodel.cpp file):
#include "epnccombomodel.h" EPNCComboModel::EPNCComboModel(QObject *parent) : QAbstractProxyModel(parent) { }My class 's python code (in epnccombo.py file):
from PyQt4.QtCore import QObject from PyQt4.QtGui import QAbstractProxyModel class EPNCComboModel(QObject) : def __init__(self, parent): QAbstractProxyModel(EPNCComboModel, self).__init__(parent)But I get an error (TypeError: __init__() missing 1 required positional argument: 'parent') on initialization:
EPNCproxyModel = EPNCComboModel()First of all, this line: EPNCComboModel::EPNCComboModel(QObject *parent) : QAbstractProxyModel(parent)
What exactly is it saying?
Create a Class deriving from QObject? (child of QObject)
And variable 'parent' equals to this QObject?