Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #97285
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail |
|---|---|
| Return-Path | <kwpolska@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'cc:addr:python-list': 0.09; 'buttons': 0.09; 'grid': 0.09; 'whichever': 0.09; '\xe2\x80\x94': 0.09; 'advance': 0.10; 'subject:not': 0.11; 'size,': 0.13; 'code?': 0.16; 'hand?': 0.16; 'resize': 0.16; 'screen,': 0.16; 'subject:screen': 0.16; 'wrote:': 0.16; 'app': 0.16; 'exists': 0.18; 'widget': 0.18; 'all,': 0.20; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'bar.': 0.22; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.24; 'chris': 0.26; 'message-id:@mail.gmail.com': 0.27; 'correct': 0.28; 'fine': 0.28; 'interface': 0.29; 'looks': 0.29; 'skip:q 20': 0.29; 'url:mailman': 0.30; 'code': 0.30; 'window': 0.30; 'screen': 0.32; 'are:': 0.32; 'url:python': 0.33; 'url:listinfo': 0.34; '(for': 0.34; 'received:google.com': 0.35; 'designer': 0.35; 'but': 0.36; 'url:org': 0.36; 'tool': 0.36; 'depends': 0.36; 'smaller': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'does': 0.39; 'application': 0.39; 'url:mail': 0.40; 'some': 0.40; 'your': 0.60; 'details': 0.62; 'more': 0.63; 'information': 0.63; 'laptop': 0.67; 'dear': 0.67; 'layout.': 0.84; 'hand,': 0.97 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Mi9Nm1e3Xh3n+9raRf81tTEdCJP+PEyAaRYs7Ab8io8=; b=kNk7tA++jW/VAS2ZOCh3EdnfKD6BkMhO7iIwctX6qqb+iJkab5NOJ/FQZmLvs3cIYT 0QjihAlOW6hAI8oO/UQAX8cR1DmLeBMrBB9SR4mrk336pT9MoQbkH2jiNLn8Hva/4ZG8 6FtYJqav8XsPWbyBpwiY0dMbPmu4/4pkJ+hL5U8PfVaZzOQTh14y7XU4pKoMHyA4J9HE pm+02TrJo6+fOWEpD4dKSMpJZDO1cuLRtBQvCLG2gMDkPTMQA41ZlrYnSuqie+yVWeCx cueNI29DUCKmaffkd+Fk7Bh/yR2FRUx8Pdqj++RJd9OXDir4tPVTfUKYPvjW+JmkYuEk WM7g== |
| MIME-Version | 1.0 |
| X-Received | by 10.31.9.212 with SMTP id 203mr7339350vkj.74.1443712029373; Thu, 01 Oct 2015 08:07:09 -0700 (PDT) |
| In-Reply-To | <24851466-7de1-408f-a0a0-548d42d21ab4@googlegroups.com> |
| References | <24851466-7de1-408f-a0a0-548d42d21ab4@googlegroups.com> |
| Date | Thu, 1 Oct 2015 17:07:09 +0200 |
| Subject | Re: PySide window does not resize to fit screen |
| From | Chris Warrick <kwpolska@gmail.com> |
| To | Hedieh Ebrahimi <hemla21@gmail.com> |
| Cc | python-list@python.org |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| 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.297.1443712037.28679.python-list@python.org> (permalink) |
| Lines | 42 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1443712037 news.xs4all.nl 23824 [2001:888:2000:d::a6]:49853 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:97285 |
Show key headers only | View raw
On 1 October 2015 at 15:44, Hedieh Ebrahimi <hemla21@gmail.com> wrote:
> 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.
> --
> https://mail.python.org/mailman/listinfo/python-list
The correct way to do this is to lay your application out using a
layout. The available layouts are:
* QHBoxLayout
* QVBoxLayout
* QGridLayout
* QFormLayout
The exact layout to use depends on your needs.
What are you using to create your Qt code? Are you using Qt Designer
or are you writing the code by hand? If you are using Qt Designer,
use the “Lay Out…” buttons in the Form menu or on the tool bar. If
you are writing Qt code by hand, it looks roughly like this (for a
VBox; Grid and Form are more complicated as they involve positioning):
lay = QtGui.QVBoxLayout(self) # your central widget, dialog, main
window — whichever one exists
btn = QtGui.QButton("Hello", lay)
lay.addWidget(btn)
Please check with Qt documentation for more details
--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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