Hello,
I'm developing an application in Qt4.5 with QTCreator.
My main idea is to have a MainWindow and various Qwidget classes that could be loaded to MainWindow centralWidget.
My problem is to have access to MainWindow centralWidget from a Qwidget class, that i suppose it is possible but i am not shore about that.
here is an example how i show a Qwidget class on MainWindow centralWidget from mainwindow.cpp
Qt Code:
void MainWindow::open_Edificio() { ui->centralwidget->hide(); static Edificio *edif = new Edificio(this); ui->centralwidget = edif; ui->centralwidget->show(); }To copy to clipboard, switch view to plain text mode
How can i do the same from a Qwidget class like Edificio in edificio.cpp for instance?
thanks for the atention
Paulo
Bookmarks