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

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -