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. wait for slot to finished
Forum Updated to NodeBB v4.3 + New Features

wait for slot to finished

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 855 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
    s002wjh
    wrote on last edited by
    #1

    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
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2
      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
      2

      • Login

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