I have a simple QPushButton on the MainWindow. I've added a slot for it:
void MainWindow::on_mybutton_pressed() {
QString file_name = QFileDialog::getSaveFileName(
this,
tr("Saving File"),
QDir::homePath(),
"Text files (*.txt);;Any file (*.*)");
}
But when the QFileDialog is closed the QPushButton remains pressed until I press another QPushButton.
How can I fix this?