Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Fixing widget geometry
tonygrim last edited by
I'm pretty new to QT and creating an app that requires one of its widgets to have identical height and width (i.e. square), no matter what the size / geometry of the containing view might be. Ideally the main window will have only two available size states - a "small" state that's some fraction of the screen size (and the same aspect ratio), and fullscreen.
Can anyone point me at some example code or offer advice on the best way to realize this?
Thanks in advance,
DerManu last edited by
Set its sizePolicy to fixed and then use setSize.