examples from the pyqt documentation.