I'm using QFileDialog::getSaveFileName to save a file in my application

Qt Code:
  1. QString fileName=QFileDialog::getSaveFileName(this,"Save As");
To copy to clipboard, switch view to plain text mode 

However, in the dialog box , the SAVE button is always enabled, even when no text is written in save as file name text box.
I want the save button to get enabled only after a file name i written in the text box.
How do i do that?