Python Forum
Updating inside Qthread
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating inside Qthread
#1
Dear all,

I have a question about how to update the value inside qthread?
As the code below, I faced difficulty to update parallel_config and series_config value.
I did connect those emitted signals in the main GUI.
The signals seems like update after, and I wish those values update before abc and efg.

Anyone got any idea?

Thanks.

from PySide2.QtCore import QThread, Signal


class DataViewTask(QThread):
    sig_parallel = Signal(int)
    sig_series = Signal(int)

        if self.parallel_config.value() == 1 or self.series_config.value() == 1:
            parallel_int = int(df.iat[0, 6])
            self.sig_parallel.emit(parallel_int)
            series_int = int(df.iat[1, 6])
            self.sig_series.emit(series_int)
        else:
            parallel_int = self.parallel_config.value()
            self.sig_parallel.emit(parallel_int)
            series_int = self.series_config.value()
            self.sig_series.emit(series_int)

        abc = self.parallel_config.value()
        efg = self.series_config.value()
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Object Handles across QThread Boundaries Denni 0 492 Aug-29-2019, 04:15 PM
Last Post: Denni

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020