Checkout the QFileDialog::setDefaultSuffix() method