PySide window does not resize to fit screen

Chris Warrick kwpolska at gmail.com
Fri Oct 2 09:25:44 EDT 2015


On 2 October 2015 at 15:10, Hedieh Ebrahimi <hemla21 at gmail.com> wrote:
> Thanks Laura,
>
> In my user interface I have many group boxes that are located inside the main widget. All the group boxes and their child widgets have fixed sizes.
>
> How can I use the width and height I get from availableGeometry or ScreenGeometry to multiply
>
> screenGeometry = QApplication.instance().desktop().screenGeometry()
> availGeometry = QApplication.instance().desktop().availableGeometry()
> width, height = availGeometry.width(), availGeometry.height()
>
> to resize my geometry by a ratio? Is this a good approach?
> --
> https://mail.python.org/mailman/listinfo/python-list

This is NOT a good approach.  A good approach involves using a layout.
See my previous e-mail for details.

Geometry is not going to help you here, especially since you would
need a ton of code to resize everything on **any** window size change
event.  And you especially do not need the screen size, because it
would still hinder changing window sizes.

-- 
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16



More information about the Python-list mailing list