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

how to send data to the second class from the workerthread

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 119 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 4 Jun 2024, 06:46 last edited by Blackzero 6 Apr 2024, 06:47
    #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.

    J 1 Reply Last reply 4 Jun 2024, 06:50
    0
    • B Blackzero
      4 Jun 2024, 06:46

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 4 Jun 2024, 06:50 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

      1/2

      4 Jun 2024, 06:46

      • Login

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