Provides methods for accessing common desktop services. More...
- string displayName(int location)
- array findFiles(string path, string pattern)
- boolean openUrl(string url)
- string storageLocation(int location)
Many desktop environments provide services that can be used by applications to perform common tasks, such as opening a file, in a way that is both consistent and takes into account the user's application preferences.
This object contains methods that provide simple interfaces to these services that indicate whether they succeeded or failed.
The openUrl() method is used to open files located at arbitrary URLs in external applications. For URLs that correspond to resources on the local filing system (where the URL scheme is "file"), a suitable application is used to open the file.
The enum values correspond to the values of the QStandardPaths::StandardLocation enum with the same names.
Returns a localized display name for the specified location or an empty QString if no relevant location can be found.
Returns file names matching pattern. Searches the files recursively from path. Pattern understands * and ? wildcards.
Uses the URL scheme
file to open the specified url with a suitable application.
Warning: A return value of
true indicates that the installer has successfully requested the operating system to open the URL in an external application. It may still fail to launch or fail to open the requested URL. This result will not be reported back to the installer.
© 2018 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. The Qt Company, Qt and their respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.