Modal spinning loader



  • Hello, I have developed a tool which I use at work, it works, but I want to add a functionality.
    This tool reads a GCODE file and displays on a QGraphicsScene the segments corresponding to the coordinates contained in the file.
    If the file is complex, it might take some time before showing the segments and the tool might look stuck.
    When the software starts to elaborate the file, I would like to show a loading spinner (a gif image) over the QGraphicsScene, possibly like a modal window with a semi-transparent background, and to remove it as the segments are ready to be shown.

    How can I obtain that?

    You can read the full code here:
    https://github.com/LuigiCaradonna/isoviewer

    If you want to try the tool, once you open it, load the iso file (bottom left button), the file is TEST.PGR, then click the button "Elabora", it is not important to set the top right inputs.


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are looking for something like QProgressDialog ?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are looking for something like QProgressDialog ?



  • Thank you for your answer.
    Yes, it seems to be what I needed, I didn't know that class, I'm new to Qt.
    I've just written some code to show the dialog while the software elaborates the data and it appears.


Log in to reply