Dear all, My question is at: http://stackoverflow.com/questions/18564293/main-program-work-good-but-when-put-it-into-a-function-doesnt-work-pyqt before answering, thank you.... Yours, mohsen