Hi,

My gui has 3 buttons for selecting a directory if required, a button for opening data files and a button for saving a text files (all opening a Qfiledialog dialog).

During the main window initialization I want to change the label of the directory selecting button to the application starting directory (code below)
Qt Code:
  1. MainWindow::MainWindow(QWidget *parent) :
  2. QMainWindow(parent), ui(new Ui::MainWindow)
  3. {
  4. ui->setupUi(this);
  5. QDir CurrentDir;
  6. ui->m_Button_Select_Directory->setText(CurrentDir.currentPath());
  7. }
To copy to clipboard, switch view to plain text mode 
The gui starts with the label changed to the gui starting directory.

My problem is when I clicked either the opening or saving files button the directory picking button is reset to its design value.

Clicking on any other buttons/tabs has not effect. Could it be a Qfiledialog problem?

Can someone point out to the possible problem here?