[.UI/FORM] How to Remove Elements fram the layout?
-
-
Have a look at "this thread":http://qt-project.org/forums/viewthread/4926
-
I make this code:
@
void MainWindow::clearScreen()
{
ui->contentWidget-layout()->removeWidget( currentWidget );
// ui->contentLayout->removeItem( ui->contentLayout->itemAt(0) ); //THIS NOT WORKS TOO
}
@@
void MainWindow::changeCurrentScreen(QWidget *newScreen)
{
currentWidget = newScreen;
ui->contentLayout->addWidget( newScreen );
}
@ -
mlong... It's hard to me explain to you what I need... but my application will have a lot of screens and depends on the side menu bar (similar to Qt Creator) the main screen of my app will show the recurses (in Qt Create it's similar to the code editor, Desing, projects screens...)
Did you understand?
The method hide() works too...