Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

view size is much smaller than windows size #24

Open
karimnorouzi opened this issue Feb 28, 2021 · 5 comments
Open

view size is much smaller than windows size #24

karimnorouzi opened this issue Feb 28, 2021 · 5 comments

Comments

@karimnorouzi
Copy link

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.

@eryar
Copy link
Owner

eryar commented Apr 1, 2021

What is your OS? Windows or Linux?

@karimnorouzi
Copy link
Author

Linux. Debian 10. compiling from source, linked to Opencascade 7.4 or 7.6.

@uzername
Copy link

uzername commented Oct 1, 2021

Can confirm that. Windows 10, linking to Opencascade from Installer from their website, version 7.5.0

@uzername
Copy link

uzername commented Oct 1, 2021

image

After I manually resize it gets in place. Hitting Reset does not change drawing area here.

@uzername
Copy link

uzername commented Oct 4, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants