Open karimnorouzi opened 3 years ago
What is your OS? Windows or Linux?
Linux. Debian 10. compiling from source, linked to Opencascade 7.4 or 7.6.
Can confirm that. Windows 10, linking to Opencascade from Installer from their website, version 7.5.0
After I manually resize it gets in place. Hitting Reset does not change drawing area here.
I think, I have found workaround. Let's say, you have a main window where occView is used. In our case it's occQt.cpp class. So, in header file I have added:
protected:
//! window was opened, resize Viewer
void showEvent(QShowEvent *ev);
In cpp file:
void MainWindow::showEvent(QShowEvent *ev)
{
QMainWindow::showEvent(ev);
myOccView->ManuallyResize();
}
in OccView class I added another public method:
void OccView::ManuallyResize()
{
if( !myView.IsNull() )
{
myView->MustBeResized();
}
}
It helped
When I compile and run against occt 7.4 and occt 7.5 , the view size is much smaller than window size. The problem goes away after first resize. How to fix the problem ? many thanks. Great sample.