void Window::on_pushButton1_clicked()
{
path
= QFileDialog::getOpenFileName(this, tr
("Open File..."), path,tr
("Files (*.*)"));
path
= QDir::toNativeSeparators(path
);
pushButton1.setText(path);
}
void Window::on_pushButton1_clicked()
{
path = QFileDialog::getOpenFileName(this, tr("Open File..."), path,tr("Files (*.*)"));
path = QDir::toNativeSeparators(path);
pushButton1.setText(path);
}
To copy to clipboard, switch view to plain text mode
This is the button that preps the path to be used to load the file from.
void Window::on_pushButton2_clicked()
{
try something...
catch one exception...
{
output error 1...
}
catch second exception...
{
output error 2...
}
catch all other exceptions...
{
output generic error...
}
QMessageBox::information(this,tr
("Loaded"),tr
("Loaded Successfully"));
perform some other operations and configurations for the future...
}
void Window::on_pushButton2_clicked()
{
try something...
catch one exception...
{
output error 1...
}
catch second exception...
{
output error 2...
}
catch all other exceptions...
{
output generic error...
}
QMessageBox::information(this,tr("Loaded"),tr("Loaded Successfully"));
perform some other operations and configurations for the future...
}
To copy to clipboard, switch view to plain text mode
What I'd like to do is to change the text of button 1 if and only if button 2's operation has reached the loaded successfully part.
Bookmarks