347 questions
Score of 0
0 answers
44 views
Cannot restart a QTimer timer after stopping it from a python script
I'm running a QWidget in python using an extended version of the following code:
class MyWidget(QWidget):
def __init__(self):
super().__init__()
self.timer = QTimer(self)
...
Score of 1
0 answers
136 views
QThread msleep() vs. QTimer in PyQt5: Key Differences, Best Practices, and Use Cases [duplicate]
I am working on a PyQt5 application where I need to perform periodic tasks. I've come across two primary approaches:
Using time.sleep() or QThread.msleep() in a subclass of QThread.
Using QTimer.
...
Score of -1
1 answer
322 views
PyQt6 app with QTimer is much slower on Windows then the same machine's WSL
I'm developing a PyQt6 app that plots data from a measurement instrument and something else related to user input, and I'm experiencing outstanding lags when I run it on Windows vs on the WSL (Windows ...
Score of 0
0 answers
46 views
Usage of Single timer for multiple triggers among various popups
I have 5 different popup's that displays 5 different properties all these 5 properties need to be checked periodically from CPP in order to update if there is any change in the value of property. At ...
Score of 0
1 answer
190 views
PyQt6 application auto-closes unexpectedly without leaving any error message
I'm developing a PyQt6 application that deals with real-time acquisition of photon intensity tracking over time and plots it in real-time, before calling a pyo3 function for post-processing on the ...
Score of 0
1 answer
159 views
QTimer is not triggered immediately after completing Blocking task
Background:
In our Embedded QT application(based on ARM processor), there is a Qtimer which will timeout for every 20ms.
Updating the user interface objects is done inside the timeout handler of this ...
Score of 0
1 answer
150 views
write() is faster than read() in TCP Connection using Qt C++
I am experiencing issues where block of data written into a socket within a QTimer in a server application ,which can't be read by the client completely because the client's read process is slow, so ...
Score of 0
1 answer
148 views
When there are multiple QTimers in the same QThread, why are the tasks associated with the QTimer executed serially?
I'm trying to run multiple timers in one QThread, I expect each timer to be independent.
But the final running result is not what I expected. All timers seem to be executed serially.
For example, in ...
Score of 4
0 answers
151 views
Segmentation fault while creating QTextEdit
I wrote a minimal example in which my application crashes. I can't figure out what's wrong. I hope someone has thoughts about the reason for this segfault.
if you increase the QTimer timeout, for ...
Score of -2
1 answer
212 views
Use of Qtimer before event loop started
I have created a simple, single thread, app in Qt6. My sole class creates a couple of timers and prints a qDebug message in the timeout slot. These messages never print.
My class is created before ...
Score of 0
1 answer
64 views
Why does pyqt subthread freezes GUI when doing heavy repetitive work?
In this simulated example I am repeating a task every 1 second using QTimer by implementing a QObject, then move it to a QThead. The simulated task takes 0.5 second. The task runs in a new thread, ...
Score of 3
1 answer
587 views
How to create a QTimer that runs independent of the main thread
I’m working on a QT QML and embedded STM32 project where an oven is being controlled by a PC via serial communications. Everything was going great until I tried to add a timed heartbeat signal to let ...
Score of 0
1 answer
269 views
How to interrupt the execution of a function in C++/Qt
I'm working on implementing a "tutorial mode" on a software that uses C++ and Qt. To this end, I need to rotate a GL view to show the user that it can move. In order to do a smooth rotation, ...
Score of -1
1 answer
138 views
How to combine QTimer with QThreadPool to get real-time?
I am trying to put a QTimer inside a QThreadPool.
The reason is that I need to count real-time since the start of a process (recording video), but the actual code seems to be lagging a bit and the ...
Score of 0
1 answer
369 views
How much resource heavy are the timers?
Suppose a timer is fired every 1 second to execute some task, which is not CPU intensive.
What is the resource heaviness of a timer itself?
Related to C# perspective: How resource heavy is a Timer?
[...