| pyqtGui | index pyqtGui.py |
Module containing the PyQt implementation for the GUI tutorial
COMMENTS:
=========
+ More complex widget creation; create a layout for parent widget,
adding child widgets, but only if parent widget doesn't already have
a layout (e.g., QHGroupBox)
+ 'Type-safe' signals/slots architecture not really taken advantage
of in Python (maybe a new feature for pychecker? :)
+ Would be nice if QString's automagically converted to Python strings
+ Nice rich text widget, QTextView
+ Rich set of widgets overall: see QMainWindow for getting started
(not used in the tutorial)
+ Easy image display (for simple image formats) using QPixmap and QLabel
IDIOMS:
=======
+ Create widgets with a parent and a label; add them to QHBoxLayout
and QVBoxLayout via addWidget()
+ Resizing policy is achieved using the 'expand' flag on addWidget()
PLUS the parent widget's sizing policy (either override sizePolicy() OR
call 'setSizePolicy(QSizePolicy()) on parent widget directly)
+ QHBox and QVBox are widgets that auto-manage their children as they
are created; use QHBoxLayout and QVBoxLayout as layout managers for parent
widgets when more discrete layout manageement is required
+ Use 'show()' on top level widgets to display that level's hierarchy
| Modules | ||||||
| ||||||
| Classes | ||||||||||||||||||
| ||||||||||||||||||
| Functions | ||
| ||
| Data | ||
| _ANCHOR = <qt.QSizePolicy instance> __file__ = r'http://www.metaslash.com/brochure/tutorial/pyqtGui.pyc' __name__ = 'pyqtGui' | ||