dialog.setWindowTitle('Open File')
dialog.setNameFilter('Images (*.png *.xpm *.jpg)')
dialog.setFileMode(QtGui.QFileDialog.ExistingFile)
if dialog.exec_() == QtGui.QDialog.Accepted:
    pass
PyQt - how to make getOpenFileName remember last opening path?