sincerely Singaporean

If you have not done so, read this full tutorial on how to use SGEXTN to build an application.

SGXFileUploader

see header file

see source file

class SGXFileUploader;

part of SGEXTN module SG_Widgets

provides file upload functionality

detailed description

list of all including inherited members

implementation details

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 member functions

static void uploadFile(void (*attachedFunction)(const SGXString&));

Detailed Description

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.

Implementation Details

Uses QML file uploader.

static void uploadFile(void (*attachedFunction)(const SGXString&));

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)

contact 05524F / report a bug / make a suggestion

about 05524F SINGAPORE values

list of 05524F projects