Qt for HarmonyOS/qtohosextras doc/File Utils Example: Difference between revisions
Add code snippets to example pages (QTFOROH-2307) |
No edit summary |
||
| Line 1: | Line 1: | ||
= File Utils Example = | = File Utils Example = | ||
Revision as of 02:11, 17 September 2026
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);