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)
MainWindow
::MainWindow(QWidget *parent
) :{
ui->setupUi(this);
ui->m_Button_Select_Directory->setText(CurrentDir.currentPath());
}
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
QDir CurrentDir;
ui->m_Button_Select_Directory->setText(CurrentDir.currentPath());
}
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?
Bookmarks