可以不打开的 QString QFileDialog::getOpenFileName ( QWidget * parent = 0, const QString & caption = QString(), const QString & dir = QString(), const QString & filter = QString(), QString * selectedFilter = 0, Options options = 0 ) [static] This is a convenience static function that returns an existing file selected by the user. If the user presses Cancel, it returns a null string.