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

Compiling issues in Qt5.12.12 Ubuntu20.04 #72

Open
nihenniuma opened this issue Jun 17, 2023 · 2 comments
Open

Compiling issues in Qt5.12.12 Ubuntu20.04 #72

nihenniuma opened this issue Jun 17, 2023 · 2 comments

Comments

@nihenniuma
Copy link

qglviewer.cpp: In member function'void QGLViewer::setCamera(qglviewer::Camera*)': qglviewer.cpp:684:14: error: 'screen' was not declared in this scope;did you mean 'QScreen'?

@nihenniuma
Copy link
Author

libQGLViewer-2.9.1

@niko-zvt
Copy link

@nihenniuma
I ran into the same problem when building on Apple M2 Pro (clang x64, macosx13.3, qt 5.9.9).
The explicit screen selection helped me. This may not work for multi-screen systems. You will need to select a specific screen.

QScreen *screen = QGuiApplication::primaryScreen();

For example:

camera->setDevicePixelRatio(screen->devicePixelRatio());

@GillesDebunne
it seems that the screen() function is not available in a UNIX-environment. Is explicit screen selection enough, as I presented above?

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

2 participants