Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business


OverviewFelgo 3 Support (Qt 5) › free space crossplatform

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #18669




    i need to download a huge amount of data, and i need to check if there is free space for it.

    what is the best solution or is there any functionality allready?





    Felgo Team

    Hi Bas,

    downloading a huge amount of data with your mobile app can prove a bit troublesome. E.g. you might not want to rely on online connectivity too much for a mobile app, as bad internet connection then breaks functionality.

    As for your question: We do not have a built in solution ready to check for free disk space. It is required to add custom Qt C++ code and do file system check with available Qt types.




    hi Gunther,

    i tried some code:

        QStorageInfo storage( m_writablePath );
        if (storage.isValid() && storage.isReady())
            list << storage.name();
            list << storage.fileSystemType();
            list << QString::number( storage.bytesAvailable() );
            list << QString::number( storage.bytesTotal() );

    but it did not work on android.

    and saw this:




    will try something else.

    i think i will call native functions on android to get proper info



    Felgo Team

    Yes, seems the bug affects this use-case. If you prefer to add a custom solution by hand, you can use pre-processor macros as well, to use different code on another platform:

    #if !defined(Q_OS_ANDROID)
    // do this if not android
    // do this if android


Viewing 4 posts - 1 through 4 (of 4 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded