How can I change the MainComponent in mainwindow?


HI all,

I am searching for this for hours but nothing found..

Basically, how can I get a reference or a pointer for the mainWindow when I am inside the MainContentComponent ?

Thanks in advance




Ask for the topLevelComponent:

You can check via dynamic_cast if it is a MainWindow. See the docs about the possible outcomes...



Also, Component::findParentComponentOfClass


Thanks guys..