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

Path csiph.com!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'minus': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'advance': 0.10; 'subject:not': 0.11; 'size,': 0.13; 'thu,': 0.15; 'cause.': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'layout,': 0.16; 'message- id:@fido.openend.se': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'resize': 0.16; 'resizing': 0.16; 'screen,': 0.16; 'skip:q 50': 0.16; 'subject:screen': 0.16; 'width,': 0.16; 'app': 0.16; 'debugging': 0.18; 'laura': 0.18; 'widget': 0.18; 'all,': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'cc:no real name:2**0': 0.22; 'fine': 0.28; 'interface': 0.29; '-0700,': 0.29; 'received:se': 0.29; 'thinks': 0.29; 'task': 0.30; 'screen': 0.32; 'maybe': 0.33; 'useful': 0.33; 'quite': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'smaller': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'things': 0.38; 'stuff': 0.38; 'does': 0.39; 'space': 0.40; 'some': 0.40; 'your': 0.60; 'header :Message-Id:1': 0.61; 'more': 0.63; 'information': 0.63; 'laptop': 0.67; 'useful.': 0.72; 'hand': 0.82; '>how': 0.84; 'header:In- reply-to:1': 0.84
To Hedieh Ebrahimi <hemla21@gmail.com>
cc python-list@python.org
From Laura Creighton <lac@openend.se>
Subject Re: PySide window does not resize to fit screen
In-reply-to <24851466-7de1-408f-a0a0-548d42d21ab4@googlegroups.com>
References <24851466-7de1-408f-a0a0-548d42d21ab4@googlegroups.com>
Comments In-reply-to Hedieh Ebrahimi <hemla21@gmail.com> message dated "Thu, 01 Oct 2015 06:44:25 -0700."
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-ID <16989.1443716352.1@fido>
Content-Transfer-Encoding quoted-printable
Date Thu, 01 Oct 2015 18:19:12 +0200
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [82.96.5.2]); Thu, 01 Oct 2015 18:19:14 +0200 (CEST)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.299.1443716363.28679.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1443716363 news.xs4all.nl 23728 [2001:888:2000:d::a6]:40222
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:97287

Show key headers only | 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