Important: Please read the Qt Code of Conduct -

How To Wait For An External Process To Complete

  • I have a button on a screen that prints an external report. When the report completes, the user is asked whether it printed correctly...and based on their response, the information is then updated in the tables, and should be displayed on the screen they are viewing.

    Here is a snippet of code I am using:

    void SalesOrderEntry::on_StockSlipPushButton_clicked()
    soStockSlips *report = new soStockSlips()


    The problem with the code above is that the cleardata and loaddata commands are executed immediately after the button is clicked and the report is called. The screen is then refreshed like I want it to, however since the report hasnt printed and the user has not responded, the information I want to display is not yet available.

    What I want to be able to do is to have the calling report wait for the external report to run before executing the cleardata and loaddata commands.

    Do you have any suggestions on how I might do this?



Log in to reply