Qt for HarmonyOS/qtohosextras doc/File Utils Example: Difference between revisions
No edit summary |
Publish example source listings and restore Files lists (QTFOROH-2307) |
||
| Line 1: | Line 1: | ||
< [[Qt_for_HarmonyOS/qtohosextras_doc|Qt for HarmonyOS / qtohosextras doc]] | |||
= File Utils Example = | = File Utils Example = | ||
| Line 13: | Line 15: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
* [[Qt_for_HarmonyOS/qtohosextras_doc/ | Files: | ||
* [[Qt_for_HarmonyOS/qtohosextras_doc/File_Utils_Example_-_fileutils.pro|fileutils/fileutils.pro]] | |||
* [[Qt_for_HarmonyOS/qtohosextras_doc/File_Utils_Example_-_main.cpp|fileutils/main.cpp]] | |||
[[Category:Qt for HarmonyOS]] | [[Category:Qt for HarmonyOS]] | ||
Revision as of 02:37, 17 September 2026
< Qt for HarmonyOS / qtohosextras doc
File Utils Example
Demonstrates moving a user-selected file to the system trash.
The window contains a single button that opens a file dialog. When a file is chosen, the example calls QtOhosExtras::moveFileToTrash() and reports the boolean result in a message box. The call is synchronous and only reports success or failure.
bool movedToTrash = QtOhosExtras::moveFileToTrash(filePath);
Files: