Instantiate a constructor with QObject *objectParent as the default parameter?
Solved
General and Desktop
-
Howdy fellow QT'ers, wondering how I'd go about making an instance of a class that has a constructor like this? I've tried all sorts of solutions including
TestClass testClass(qobject_cast<QObject* objectClass>);
and still no luck. Thanks
The constructor looks like this:
TestClass(QObject * objectParent)
-
@Calicoder said in Instantiate a constructor with QObject *objectParent as the default parameter?:
TestClass testClass(qobject_cast<QObject* objectClass>)
this does not even compile...
your class you pass has to derive from QObject.