QGroupBox derived class does not inherit setParent(QObject* parent);
Unsolved
General and Desktop
-
So I have this class:
class Profile : public QGroupBox
And I see that QGroupBox inherits from QWidget, which inherits from QObject, which has the method:
void setParent(QObject* parent);
But then I try to access this inherited method in another method of my MainWindow class:
void MainWindow::add_profile(const Profile* profile) { profile->setParent(ui->scrollAreaWidgetContents_2); // ^^^ error here: no matching member function for call to 'setParent' // stuff }
Any suggestions?
Thx.
-
setParent() is not a const function so don't pass a const pointer.