Misalignment issues for using QT6

Hi
When occt 7.6 is used with Qt viewer windows has misalignment with windows. Or the mouse pointer and marker locations are different. It does not happen with Qt 5.15.2
Attached is the screen of the sample occt viewer. (Location of mouse pointer is different from market on screen). I also compiled Mayo viewer (https://github.com/fougue/mayo.git) with Qt6.3 and Occt 7.6. The viewport size is smaller than windows which did not happen with Qt 5.15.2.
How can it be corrected?

Thanks
Richard

Jacob Bandyk's picture

Are you using Qt auto scaling?
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
or
qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", "1");

I believe this causes a difference between mouse position and the location detected by the viewer.

Richard Lin's picture

Hello, Thanks for the comment.
Sorry for late replay.
No I am not using this scaling value.
When the Mayo (https://github.com/fougue/mayo) is compiled with Qt 6, OpenGL windows does not fill up the available space in the parent Qt window. With Qt 5 , it went well. (without changing any code in both cases)