Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #97287

Re: PySide window does not resize to fit screen

From Laura Creighton <lac@openend.se>
Subject Re: PySide window does not resize to fit screen
References <24851466-7de1-408f-a0a0-548d42d21ab4@googlegroups.com>
Date 2015-10-01 18:19 +0200
Newsgroups comp.lang.python
Message-ID <mailman.299.1443716363.28679.python-list@python.org> (permalink)

Show all headers | View raw


In a message of Thu, 01 Oct 2015 06:44:25 -0700, Hedieh Ebrahimi writes:
>Dear all, 
>
>I am using Pyside to create a user interface for my app. 
>The app works fine on my computer with big screen, but when I take it to my laptop with smaller screen size, it does not resize to match the screen size. 
>
>How can I make my main widget get some information about the screen size and resize automatically? 
>
>Thanks in Advance for your answers.

screenGeometry = QApplication.instance().desktop().screenGeometry()
to find out your desktop size in pixels.
availGeometry = QApplication.instance().desktop().availableGeometry()
is the same thing minus the space for the task bar, so maybe more
useful.

width, height = availGeometry.width(), availGeometry.height()

Finding out what pyside thinks the size is can be useful for debugging
problems, but this stuff should already be happening automatically.  There is
something not quite right with your layout, and brutally resizing things
by hand is treating the symptom, not the cause.

Laura

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

PySide window does not resize to fit screen Hedieh Ebrahimi <hemla21@gmail.com> - 2015-10-01 06:44 -0700
  Re: PySide window does not resize to fit screen Chris Warrick <kwpolska@gmail.com> - 2015-10-01 17:07 +0200
  Re: PySide window does not resize to fit screen Laura Creighton <lac@openend.se> - 2015-10-01 18:19 +0200
    Re: PySide window does not resize to fit screen Hedieh Ebrahimi <hemla21@gmail.com> - 2015-10-02 06:10 -0700
      Re: PySide window does not resize to fit screen Chris Warrick <kwpolska@gmail.com> - 2015-10-02 15:25 +0200
        Re: PySide window does not resize to fit screen Hedieh Ebrahimi <hemla21@gmail.com> - 2015-10-05 01:18 -0700
          Re: PySide window does not resize to fit screen Laura Creighton <lac@openend.se> - 2015-10-05 12:51 +0200
            Re: PySide window does not resize to fit screen Hedieh Ebrahimi <hemla21@gmail.com> - 2015-10-05 04:20 -0700
              Re: PySide window does not resize to fit screen Chris Warrick <kwpolska@gmail.com> - 2015-10-05 15:32 +0200
              Re: PySide window does not resize to fit screen Michael Torrie <torriem@gmail.com> - 2015-10-05 10:28 -0600
            Re: PySide window does not resize to fit screen wxjmfauth@gmail.com - 2015-10-05 11:28 -0700

csiph-web