Cannot get lineEdit to update in main frame
<p>I have a main window that has an options tab that allows a user to update their input file and home directories. This function updates a text file for each of the given profiles a user could have for a project. All these functions work great..the lineEdits show the right directories when first executed in the <code>__init__</code>  ...except for the fact of reflecting the changes onto the lineEdits on the main window when a change has been made.</p>

<pre><code>class MAIN_GUI(QtGui.QMainWIndow):
    def __init__(self):
        super(MAIN_GUI,self).__init__()
        self.uiM=Ui_MainWindow()
        self.uiM.setupUi(self)
        self.update_dir_lines()
        self.connect(self.uiM.Options_ChangeButton,QtCore.SIGNAL("clicked()"),self.choose_DIR)

    def choose_DIR(self):
        choose_DIR = Choose_DIR(current_profile,'main')
        choose_DIR.show()
        choose_DIR.exec_()

    def update_dir_lines(self):
        #pull the saved file directory from the profile.txt
        self.InputFileDir = str(profile.get_dir('InputFileDir'))
        self.uiM.Options_InputDIR_lineEdit.setText(self.InputFileDir)
        #just to see that it's been changed print into console
        print self.uiM.Options_inputDIR_lineEdit.text() #this actually comes back with the changed directory
        #same spiel for the home directory so no need to repeat

class Choose_DIR(QtGui.QDialog):
    def __init__(self):
        super(Choose_DIR,self).__init__()
        self.ui3=Ui_Directories()
        self.ui3.setupUi(self)
        self.connect(self.ui3.Options_InputFileDir_BrowseButton,QtCore.SIGNAL("clicked()"),self.get_InputFileDir)
        #doing the same for the home dir so no need to repeat

    def get_InputFileDir(self):
        QString_dir = QFileDialog.getExistingDirectory(parent=None,caption=("Choose InputFile Directory"),directory(''),optins=QFileDialog.ShowDirsOnly)
        self.ui3.Options_InputFileDir_lineEdit.setText(QString_dir) #this works perfectly reflecting the chosen input File Dir
        self.connect(self.ui3.select_DIR_ExecuteButton,QtCore.SIGNAL("clicked()"),self.change_DIR)
    def change_DIR(self):
        InputFileDir = self.ui3.Options_InputFileDir_lineEdit.text()
        #profile is being edited and saved
        profile.change_dir('InputFileDir',InputFileDir) 
        self.go2main()

    def go2main(self):
        self.close()
        main = MAIN_GUI()
        QtCore.QTimer.singleShot(1000,main.update_dir_lines)
</code></pre>

<p>I think the last function, instead of going to the main window is creating another instance of the main window but not showing cuz I haven't told it with <code>main.show()</code> but I don't know how to send the right signal to the main GUI to refresh the lineEdits...I know the text were set cuz the console is printing out the correct directories the lineEdits were changed to but the lineEdits themselves do not reflect that. I tried using <code>QApplication.instance().processEvents()</code> but I don't think it's working. I used it with the <code>update_dir_lines</code> function and it just terminated the main GUI. Can anyone help me out?</p>