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


Groups > comp.lang.python > #80891

Re: PySide 1.2.2 setMaxWidth and AeroSnap

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <vincent.vande.vyvre@telenet.be>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.054
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'method,': 0.09; 'width': 0.09; 'python': 0.11; 'def': 0.12; 'question.': 0.14; 'windows': 0.15; 'from:name:vincent vande vyvre': 0.16; 'received:195.130': 0.16; 'received:195.130.137': 0.16; 'received:telenet-ops.be': 0.16; '\xe9crit': 0.16; 'app': 0.19; 'module': 0.19; 'widget': 0.19; 'import': 0.22; 'header:User-Agent:1': 0.23; "shouldn't": 0.24; 'code:': 0.26; 'header:In-Reply-To:1': 0.27; 'skip:q 20': 0.31; 'class': 0.32; 'another': 0.32; 'skip:_ 10': 0.34; "can't": 0.35; 'tool': 0.35; 'case,': 0.35; 'but': 0.35; 'add': 0.35; 'doing': 0.36; "didn't": 0.36; 'so,': 0.37; 'christian': 0.38; 'manager': 0.38; 'window': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'kind': 0.63; 'charset:windows-1252': 0.65; 'header:Reply-To:1': 0.67; 'limit': 0.70; 'reply-to:no real name:2**0': 0.71; '600,': 0.84; 'look.': 0.84; 'mate,': 0.84; 'why?': 0.91; 'anymore,': 0.95
Date Sun, 16 Nov 2014 18:34:35 +0100
From Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version 1.0
To python-list@python.org
Subject Re: PySide 1.2.2 setMaxWidth and AeroSnap
References <CAAp0bGsG4hreikzPEY1gB6mKFfKAx9z5zkCQjzL5rYN8psMBoA@mail.gmail.com>
In-Reply-To <CAAp0bGsG4hreikzPEY1gB6mKFfKAx9z5zkCQjzL5rYN8psMBoA@mail.gmail.com>
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To vincent.vandevyvre@oqapy.eu
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.15890.1416159962.18130.python-list@python.org> (permalink)
Lines 42
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1416159962 news.xs4all.nl 2878 [2001:888:2000:d::a6]:39797
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:80891

Show key headers only | View raw


Le 16/11/2014 16:51, Juan Christian a écrit :
> PySide 1.2.2
> Python 3.4.2
>
> Code:
>
> from PySide.QtGui import *
>
> class MainWindow(QWidget):
> def __init__(self):
> QWidget.__init__(self)
> self.setMinimumSize(600, 700)
> self.setMaximumWidth(600)
> self.setLayout(QVBoxLayout())
>
> * Call to this module in another module *
> app = QApplication(sys.argv)
> window = MainWindow()
> window.show()
> app.exec_()
>
> When I set the "setMaxWidth" I can't use the Windows AeroSnap anymore, 
> why?
>
> I didn't set a "setMaxHeight", so this shouldn't lock me from doing 
> the snap. Without the "setMaxWidth" the AeroSnap works as usual, but I 
> need to limit my width to 600, because I need my tool to have this 
> kind of "short-width, long-height" look.
>
>
No probleme with PyQt but I think this is a window manager question. 
Window, gnome, KDE, Mate, ...


If your widget is a QMainWindow or a QDialog add a size grip:

         self.setSizeGripEnabled(True)

The QWidget don't have this method, so, in this case, you must 
reimplement his resizeEvent()

Vincent

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


Thread

Re: PySide 1.2.2 setMaxWidth and AeroSnap Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2014-11-16 18:34 +0100

csiph-web