sincerely
Singaporean
If you have not done so, read this full tutorial on how to use SGEXTN to build an application.
class SGXFileUploader;
part of SGEXTN module SG_Widgets
provides file upload functionality
list of all including inherited members
preprocessor file inclusion directive: #include ‹SGXFileUploader.h›
CMake target for BuildLah: SGEXTN::SG_Widgets
see this link for more information about BuildLah
parent class: (none)
children classes: (none)
static void uploadFile(void (*attachedFunction)(const SGXString&));
SGXFileUploader allows the user to upload a file from anywhere in the file system into the application. Note that this does not actually involve uploading from a network, it just gives the user a file dialog. This is required to access files outside the application folder on mobile.
Uses QML file uploader.
Offers the user to upload a file. After the file is uploaded, the callback function ⁽㈳㈴㈳㈮㈱㈨㈠㈫ ㈧㈤㈱㈤⁾ attachedFunction will be called with the argument being the file path.
If no file is chosen, the argument used to call attachedFunction will be an empty string. This must be handled appropriately.
The path is guaranteed to be in the application folder, the uploaded file is first copied into the application folder before attachedFunction is called. You should move the file to the correct location in attachedFunction.
attachedFunction being nullptr will crash.
©2025 05524F.sg (Singapore)