can the Open File dialog be used to select a Folder?

前端 未结 2 1444
离开以前
离开以前 2020-12-23 18:44

The \"Browse For Folder\" Windows dialog is very inconvenient because:

  • it has no Path box where I can paste the path I want (eg from Total Commander)
2条回答
  •  清酒与你
    2020-12-23 19:32

    You can set the file mode in QFileDialog to QFileDialog::Directory

    see http://qt-project.org/doc/qt-5.0/qtwidgets/qfiledialog.html#FileMode-enum

    Or You can use QFileDialog::setOption with value QFileDialog::ShowDirsOnly

提交回复
热议问题