c++ - Why should I have to specify a parent for the QFileDialog -
why should have specify parent qfiledialog
?
const qstring& file_name = qfiledialog::getsavefilename( 0, // "export", qdir::currentpath(), "excel files (*.xlsx)" );
what's point? can set 0?
yes, can set 0.
qfiledialog
inherits qdialog
. from qt 5 qdialog documentation:
...a dialog top-level widget, but if has parent, default location centered on top of parent...
update: important addition in first comment.
Comments
Post a Comment