If you omit the argument (or pass in an empty string), the dialog should remember the last directory:
The tr function is used for translating user-visible strings. You can omit it if you won't ever be providing translations for your application.
EDIT:
It seems that the start directory may not be automatically remembered on all platforms/desktops, depending on whether you use the native dialog or not. If Qt's built-in dialog is used, the start directory should always be automatically remebered on all platforms (even between invokations of the application). To try the non-native dialog, do:
Alternatively, you can use the QFileDialog constructor, which will always create a non-native dialog:
今天的文章 打开目录的函数是什么(打开目录的函数是什么意思)分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ri-ji/34801.html