Mainwindow content gets vignetted at border
-
Hello,
I have a problem with a project when running it on a Windows 10 machine (Dell-Laptop).
The problem is, that the outer border of the QMainWindow gets vignetted. Like if the content of the QMainWindow is scaled by some % so it does not fit inside the window any more. The vignetting is maybe 10-20 pixels on all sides of the window. Any widget that is there just gets cut off.I am not sure, but maybe it has something to do with the High-DPI settings? I using following settings for High-DPI support (the device with the problem does not have a High-DPI display)
in main()
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QSurfaceFormat fmt; fmt.setSamples(10); QSurfaceFormat::setDefaultFormat(fmt);
and in Qt.conf
[Platforms] WindowsArguments = dpiawareness=0
Any ideas what could be the reason?
-
Hi,
Can you show a screenshot of what you are getting ?
Can you provide a minimal compilable example that shows that behaviour ?
What version of Qt are you using ?Are you sure all your designer widgets are indeed in a layout ? AFAIR, Designer does not generate layouts automatically you have to tell it that you want one when putting things together.
-
@gde23 said in Mainwindow content gets vignetted at border:
which will automatically generate the layouts
It does not, you have to layout your widgets the way you want them to be layd out.
-
@SGaist: here is a screenshot of the GUI.
On the top there is a QTabWidget where the QTabBar is normally visible, however here it is vignetted. The vignetting can also be seen on the bottom, where the StatusBar is cut off half.
The GUI is using a stylesheet, that is why the QDockWidgets look a bit different than usual.
In the designer of course I have set a layout and added all the widgets to the layout.
The Qt Version is 5.13.0 and I have been tried it on several machnies Linux and Windows (also with High-DPI Screen scaling turned on in Windows) which works fine on any machine I've tested it, except on that one Dell-Notebook with Windows 10.