qthread

PyQt threading loop on start

PyQt threading loop on start Question: I have been trying to get threading going with PyQt6 without much luck. I have explored multiple solutions, followed some tutorials and videos as well as looked at various questions previously asked by other users. Still, I do not seem to find a solution to make my code work. …

Total answers: 1

PyQt5 Access GUI elements from QThread

PyQt5 Access GUI elements from QThread Question: Im trying to access GUI Elements from a QThread, but without success so far. im using this example because i want to find an easy and clean way to access the elements, help? class UI(QMainWindow): def __init__(self): super(UI, self).__init__() uic.loadUi("GUI.ui", self) self.thread = {} self.listbox_devices = self.findChild(QListWidget, "listbox_devices") …

Total answers: 1

Restart QThread with GUI

Restart QThread with GUI Question: I am using QThread to do some calculations in a separate Thread. The Thread gets started by a button click, witch launches the function StartMeasurement(). The Thread can finish the process by itself (after finished the calculations) and emits the PyQT Signal finished. Or the thread can be stopped by …

Total answers: 1

Why do external functions cause the PyQt5 window to freeze?

Why do external functions cause the PyQt5 window to freeze? Question: Here is some sample code that breaks: import sys import time from PyQt5.QtWidgets import (QApplication, QDialog, QProgressBar) class Actions(QDialog): def __init__(self): super().__init__() self.initUI() def initUI(self): self.progress = QProgressBar(self) self.progress.setGeometry(0, 0, 300, 25) self.show() self.count = 0 while self.count < 100: self.count += 1 time.sleep(1) …

Total answers: 2

Example of the right way to use QThread in PyQt?

Example of the right way to use QThread in PyQt? Question: I’m trying to learn how to use QThreads in a PyQt Gui application. I have stuff that runs for a while, with (usually) points where I could update a Gui, but I would like to split the main work out to its own thread …

Total answers: 3

Background thread with QThread in PyQt

Background thread with QThread in PyQt Question: I have a program which interfaces with a radio I am using via a gui I wrote in PyQt. Obviously one of the main functions of the radio is to transmit data, but to do this continuously, I have to loop the writes, which causes the gui to …

Total answers: 7

Sending custom PyQt signals?

Sending custom PyQt signals? Question: I’m practicing PyQt and (Q)threads by making a simple Twitter client. I have two Qthreads. Main/GUI thread. Twitter fetch thread – fetches data from Twitter every X minutes. So, every X minutes my Twitter thread downloads a new set of status updates (a Python list). I want to hand this …

Total answers: 5