Qt: allow to resize the render widget however wanted on render to main
This commit is contained in:
parent
1fe92b8be7
commit
6f2d8fad8f
|
@ -761,6 +761,7 @@ void MainWindow::ShowRenderWidget()
|
||||||
|
|
||||||
m_stack->setCurrentIndex(m_stack->addWidget(m_render_widget));
|
m_stack->setCurrentIndex(m_stack->addWidget(m_render_widget));
|
||||||
connect(Host::GetInstance(), &Host::RequestTitle, this, &MainWindow::setWindowTitle);
|
connect(Host::GetInstance(), &Host::RequestTitle, this, &MainWindow::setWindowTitle);
|
||||||
|
m_stack->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
|
||||||
m_stack->repaint();
|
m_stack->repaint();
|
||||||
|
|
||||||
Host::GetInstance()->SetRenderFocus(isActiveWindow());
|
Host::GetInstance()->SetRenderFocus(isActiveWindow());
|
||||||
|
@ -786,6 +787,7 @@ void MainWindow::HideRenderWidget(bool reinit)
|
||||||
m_stack->removeWidget(m_render_widget);
|
m_stack->removeWidget(m_render_widget);
|
||||||
m_render_widget->setParent(nullptr);
|
m_render_widget->setParent(nullptr);
|
||||||
m_rendering_to_main = false;
|
m_rendering_to_main = false;
|
||||||
|
m_stack->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||||
disconnect(Host::GetInstance(), &Host::RequestTitle, this, &MainWindow::setWindowTitle);
|
disconnect(Host::GetInstance(), &Host::RequestTitle, this, &MainWindow::setWindowTitle);
|
||||||
setWindowTitle(QString::fromStdString(Common::scm_rev_str));
|
setWindowTitle(QString::fromStdString(Common::scm_rev_str));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue