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 send data to the second class from the workerthread

how to send data to the second class from the workerthread

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 201 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.
  • B Offline
    B Offline
    Blackzero
    wrote on last edited by Blackzero
    #1

    I created a multi-threaded class with mainwindow and workerthread class files then I turned on the doWork function from mainwindow on workerthread, but the problem is how can workerthread send the process information to the dialog class called viewproccess, how to solve it?
    mainwidow invokes doWork on workerthread then workerthread sends the process information to the viewprocess dialog class, I want it that way.

    jsulmJ 1 Reply Last reply
    0
    • B Blackzero

      I created a multi-threaded class with mainwindow and workerthread class files then I turned on the doWork function from mainwindow on workerthread, but the problem is how can workerthread send the process information to the dialog class called viewproccess, how to solve it?
      mainwidow invokes doWork on workerthread then workerthread sends the process information to the viewprocess dialog class, I want it that way.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Blackzero said in how to send data to the second class from the workerthread:

      how can workerthread send the process information to the dialog class called viewproccess

      By using signals/slots.
      The worker class simply emits a signal if it wants to send data. Whoever needs this data connects a slot to that signal.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      5

      • Login

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