Congratulations to our 2022 Qt Champions!

A simple updater system for your projects

  • Hello,

    Recently, I found the need to implement a way to check for updates in some of my Qt applications, however I did not find any library to do the job, so I decided to write it myself. After implementing the updater system, I thought that it would be very helpful to develop a "library" that would be easy to implement and would work for almost any Qt project (you just need to include a *.pri file in your project). Of course, the system is supported on any OS that is supported by Qt and SSL.

    The idea behind this updater system is simple, you will need to have the following files in a remote server which can be accessed by HTTP:

    • A plain text file containing only the latest version number of your app.

    • A file that contains the changelog in any format you desire.

    Then, you just tell QSimpleUpdater where the files are and it will do the rest of the work for you. A minimalist example would be:

    @QSimpleUpdater *updater;

    // Point out the version of the local (installed) application (obligatory)

    // Point out where the changelog file is (optional)

    // Point out where the file containing the latest app version is (obligatory)

    // Point out the URL to open when we call the downloadLatestVersion() function (optional)

    // Do something when the updater finishes checking for updates (such as showing a messagebox)
    connect(updater, SIGNAL(checkingFinished()), this, SLOT(onCheckingFinished()));

    // Finally, check for updates

    I have written an example that will help anyone interested in the project to implement it in their own projects.

    You can find the source of QSimpleUpdater "here":

    Any feedback is greatly appreciated :)

  • Moderators

    Nice project, thanks for sharing!

  • Lifetime Qt Champion


    Interesting !

    One thing that is missing is the possibility to download files directly.

  • Hi,

    I implemented an updater dialog in the last commit, the dialog allows the user to see the progress of the download and open the downloaded file by clicking the "Install" button.

    To use the dialog, just specify which file to download with the setDownloadUrl() function, call checkForUpdates() and then downloadLatestVersion().


    ! 1)!

    ! 2)!

  • Lifetime Qt Champion

    Are you planning on offering a Pause/Reset (e.g.) mode when downloading ?

  • I tried to check example application given by you but, it gives error when we click on check for update button. the error "An unknown error occured while checking for updates" pops-up on click of check for update button. can you suggest me what to do?

Log in to reply