All Questions
Tagged with pyqt5 signals-slots
140
questions
0
votes
0
answers
29
views
Do I *Always* Need to Access GUI Elements from External Threads Using Signal/Slot in PyQt5?
While developing a Windows-based program using PyQt5, I encountered issues where the GUI was not updating in a timely manner due to long computation or wait times. To resolve this, I moved some ...
-1
votes
1
answer
49
views
Good practices on where to define the connection of custom Signals and Slots
When I emit a signal in script A and catch it script B to execute a slot there. Where should the mysignalA.connect(myslotB) go?
In script A as: self.mysignalA.connect(B.myslotB)
or in script B as: A....
0
votes
1
answer
55
views
Do I need to manually disconnect signals if I am going to call deleteLater on a PyQt widget?
I have a QMainWidnow that spawns a number of different dialog boxes, I have been manually disconnecting all the signals before deleting the dialogs. Is this necessary, or are they cleaned up by the ...
4
votes
2
answers
180
views
Performing bidirectional signals in QThreads
I've been wondering over the question: is there are correct (or standard) way to create QThreads, which make of use of bidirectional signals?
That is, QThreads capable of processing not only custom ...
0
votes
0
answers
50
views
PyQt5 Signals not received from Thread after some time in QMainWindow and QWidget
I have QThread where Flask app is running and serves as Webhook receiver.
class WebhookListenerThread(QThread):
webhook_received = pyqtSignal(dict)
app = Flask(__name__)
def __init__(self)...
-2
votes
1
answer
217
views
PyQt5 passing a string between two objects with custom signals and slots [closed]
Being far from an OO specialist, I was playing the last weeks with Qt5 in Python. The GUI I want to use is making use of QStackedWidget in which window designs are collected. I can switch from one ...
1
vote
1
answer
598
views
How to implement a Progress Bar using PyQt5?
I'm using PyQt5 and I want to know how to implement a progress bar, so the user can see the progress of a certain function that takes several minutes to complete. I want the progress bar to be ...
0
votes
2
answers
355
views
PyQt readyRead: set text from serial to multiple labels
In PyQt5, I want to read my serial port after writing (requesting a value) to it. I've got it working using readyRead.connect(self.readingReady), but then I'm limited to outputting to only one text ...
0
votes
0
answers
97
views
PyQt5 execution order is wrong
I am working on a small web crawler project for coursework using PyQt. I am trying to do a very simple thing - when a button is clicked the crawler starts running, I want to disable the button until ...
1
vote
1
answer
471
views
PyQt5: calling widget slots safely from a worker thread
How to call widget slots from QThread worker?
I know I could create a signal for each widget's slot like this:
class App(QtWidgets.QMainWindow):
signal_line_edit_1_setText = pyqtSignal(str)
...
0
votes
1
answer
356
views
Use Signal to pass QImage from a Worker Thread to Main UI Thread to Display in pyqt5 GUI (Python)
I'm trying to define my own signal to display QImage (converted from raw data) upon a button press. The GUI has a button called as connect, and a QLabel that's named as DisplayRect.
I'd like to draw ...
1
vote
1
answer
60
views
New signal connects to old slot instead of separate slot
I am trying to tag x-spans of a data trace and populate a table with tagNames, starting x value, and the ending x value. I am using a dictionary of 'highlight' objects to keep track of the x-spans in ...
1
vote
1
answer
386
views
PyQt5: connecting signals to lambda functions used with QRunnable in a worker thread
I have a GUI made with PyQt5, and there is a start-button on it. When the start-button is clicked, the program will start to count from 1 to 5 and then show a pop-up window to ask if the task should ...
1
vote
2
answers
315
views
How to use QElapsedTimer without a QTimer?
When I tried to use QElapsedTimer to clear a text in a label I couldn't find a way of using it without a QTimer. Is there a way of connecting a method so that it will do something when the ...
0
votes
1
answer
63
views
Multithreading in PyQt5
Imagine the below case. buttonClickEvent() function is started when a QPushButton is clicked and this function has 2 threads(thread 1 and thread 2) and each thread has a signal. I have a function ...