High DPI and QOpenGLWindow
-
I've developed a program in Qt 5.15.2 on Windows 10 that has two components: a QDialog window that allows files to be read-in with various setting toggles and an information window and a separate QOpenGLWindow that is generated according to the settings in the Dialog.
Developed on normal dpi it works perfectly, but deployment to a high dpi screen results in a dialog that is too small to be used while the image in the QOpenGLWindow looks fine. When use the High DPI option (using DEFINES += QT_ENABLE_HIGHDPI_SCALING in the compilation) the situation is reversed - the QDialog window looks fine but the QOpenGLWindow is a mess - while the window frame is the right size the contents are shrunk by, presumably, the same scaling amount that was required for the QDialog to look good, and huddle in the bottom left corner.
So what to do? How do I get both to display correctly? One possibility is to modify the scaling factor in the GLWindow by the amount that Windows uses
to scale the Dialog - if I could find it.I'd be grateful for any help in solving this problem. Redrawing the QDialog in hi-res is NOT an option.
DS