I cannot resize window properly. when the minimize button is clicked,
this->setMaximumSize(400, 400);
this->setMaximumSize(400, 400);
To copy to clipboard, switch view to plain text mode
works, but it overwrites previous window and the other parts of the UI still remain on the screen. The ui does not become smaller. Similarly, when I click minimize again to maximize UI, it again does not become bigger to the original size
ui->widget_display->setGeometry(200, 0, 791, 800);
ui->widget_display->setGeometry(200, 0, 791, 800);
To copy to clipboard, switch view to plain text mode
. I used the update() method, but still does not render the mainwindow from the beginning.
void MainWindow::on_pushButton_clicked()
{
if(minimized == false)
{
this->setMaximumSize(400, 400);
ui->widget->hide();
ui->widget_display->setGeometry(10, 10, 400, 400);
minimized = true;
update();
}
else
{
this->setMaximumSize(1152, 864);
ui->widget->show();
ui->widget_display->setGeometry(200, 0, 791, 800);
minimized = false;
update();
}
qDebug() << "Minimizing";
}
void MainWindow::on_pushButton_clicked()
{
if(minimized == false)
{
this->setMaximumSize(400, 400);
ui->widget->hide();
ui->widget_display->setGeometry(10, 10, 400, 400);
minimized = true;
update();
}
else
{
this->setMaximumSize(1152, 864);
ui->widget->show();
ui->widget_display->setGeometry(200, 0, 791, 800);
minimized = false;
update();
}
qDebug() << "Minimizing";
}
To copy to clipboard, switch view to plain text mode
Bookmarks