Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved wait for slot to finished

    General and Desktop
    2
    2
    686
    Loading More Posts
    • 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
      s002wjh last edited by

      in my function i'm constantly emit a signal, but i would like to only emit the signal after my slot function are finished, anyway to do that?

      1 Reply Last reply Reply Quote 0
      • sierdzio
        sierdzio Moderators last edited by

        if (canEmit) {
          canEmit = false;
          emit mySignal();
        }
        // Slot:
        void mySlot() {
          doSomething();
          emit processingFinished();
        }
        // The previous class, slot:
        void onProcessingFinished() {
          canEmit = true;
        }
        

        (Z(:^

        1 Reply Last reply Reply Quote 2
        • First post
          Last post