Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80891
| Date | 2014-11-16 18:34 +0100 |
|---|---|
| From | Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> |
| Subject | Re: PySide 1.2.2 setMaxWidth and AeroSnap |
| References | <CAAp0bGsG4hreikzPEY1gB6mKFfKAx9z5zkCQjzL5rYN8psMBoA@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.15890.1416159962.18130.python-list@python.org> (permalink) |
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
Re: PySide 1.2.2 setMaxWidth and AeroSnap Vincent Vande Vyvre <vincent.vande.vyvre@telenet.be> - 2014-11-16 18:34 +0100
csiph-web