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. Call Slot only when process finished the last time?
Forum Update on Monday, May 27th 2025

Call Slot only when process finished the last time?

Scheduled Pinned Locked Moved Unsolved General and Desktop
slotsignalsprocessloop
3 Posts 2 Posters 1.2k Views
  • 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.
  • O Offline
    O Offline
    Opa114
    wrote on 6 Jan 2016, 15:57 last edited by
    #1

    Hi there,

    in my application i have a FOR-Loop in which i start a process x-times. When the process finishes i call the my Slot-function to show a MessageBox to the user that it has finished.

    My Problem is now, that the Slot-Function is everytime called when the process finished. So when the process starts 5-times, the message appears 5-times, but the message should only appear if the process runs the 5th time (the last run).

    How can i do this? Thanks for help!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 6 Jan 2016, 16:10 last edited by
      #2

      Can't you Just move the message box out of the loop then?

      O 1 Reply Last reply 6 Jan 2016, 16:42
      0
      • C Chris Kawa
        6 Jan 2016, 16:10

        Can't you Just move the message box out of the loop then?

        O Offline
        O Offline
        Opa114
        wrote on 6 Jan 2016, 16:42 last edited by Opa114 1 Jul 2016, 00:38
        #3

        @Chris-Kawa yes that is an option, but what if erros appear while the processes running? If i put the MessageBox after the for-loop i need a mechanism to check if there was an error or not. therefore i wanted to use Signal and Slot for the process.

        EDIT
        i solved it. I wrote a function in which i check if there where errors with readAllStandardError and if the size of it is zero, no error appeared and the show the message box.

        1 Reply Last reply
        0

        1/3

        6 Jan 2016, 15:57

        • Login

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