Good afternoon! I have a button, when clicked, QFileDialog opens. I select the file. The path is written in the LineEdit and variables. But the variable does not change the value
path = None
def get_file_dbf():
if ui.file_dialog.exec_():
file_name = ui.file_dialog.selectedFiles()
ui.lineEdit.setText(file_name[0])
path = str(file_name[0])
ui.toolButton.clicked.connect(get_file_dbf)
def go_transfer():
print(path) #None
ui.pushButton.clicked.connect(go_transfer)