Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How To Wait For An External Process To Complete
Forum Updated to NodeBB v4.3 + New Features

How To Wait For An External Process To Complete

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 583 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    ScottKrise
    wrote on last edited by
    #1

    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()
    report->setAttribute(Qt::WA_DeleteOnClose)
    report->exec(ui->orderNumberLineEdit->text());

    clearData();
    loadData(ui->orderNumberLineEdit->text());
    }

    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?

    Thanks,

    Scott

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved