qtimer Questions
5
Solved
I know this has been asked many times before. I read all of those threads, and my case seems different. Everybody else who has this trouble has a few straightforward causes that I think I’ve ruled ...
4
I am trying to start a Timer in a worker thread's event loop, but I get this error:
QObject::startTimer: Timers can only be used with threads started with QThread
Whats wrong with this?
#include...
3
When (and only when) I quit my application, these (and only these) repeated message appear on the command prompt:
QObject::startTimer: QTimer can only be used with threads started with QThread
QOb...
Lectern asked 26/11, 2012 at 10:4
3
Solved
When I create a QTimer object in Qt 5, and start it using the start() member function, is a separate thread created that keeps track of the time and calls the timeout() function at regular interv...
Giffard asked 16/2, 2017 at 16:20
4
Solved
I would like to run a timer inside a QThread. I have written some code in which I am getting some error during the run time. What am I doing wrong?
(Parent is QThread(0x1498d10), parent's thread i...
Jutta asked 23/9, 2013 at 11:47
1
Solved
4
Solved
I am having a hard time wording this question even though I don't think its that complicated.
I want to do something simalar to QTimer::singleshot() but I want it to still only call the SLOT once...
5
Solved
// Example class
class A : public QObject
{
Q_OBJECT
void fun() {
Timer::SingleShot(10, timerSlot); //rough code
}
public slot:
void timerSlot();
}
auto a = SharedPointer<A>(new A);
a-...
Womanly asked 17/6, 2016 at 1:29
2
Solved
1
I encounter cases during unit testing where I want the timeout of some QTimer to fire some slot in some QObject. It is not immediately obvious how to do this and some common pitfalls to this testin...
Muster asked 20/11, 2015 at 15:7
1
Solved
I have an app written in QT that uses QTimer. It's basically a game and all the actions are controlled by the timer. Game includes the ability to increase\decrease the game speed. The code for incr...
3
Hy,
I'm writing my first Qt program and getting now in troubles with:
QObject::killTimer: timers cannot be stopped from another thread
QObject::startTimer: timers cannot be started from another ...
Handicapped asked 20/10, 2014 at 9:0
1
Solved
Suppose I have 2 QTimer objects with 10, 20 as their intervals. And suppose I want to run slot1() with timer 1 timeout signal and slot2 with timer 2. So running order of slot1 and slot2 is somethin...
Rochkind asked 19/6, 2014 at 5:43
4
Solved
I currently have a method which is as follows
void SomeMethod(int a)
{
//Delay for one sec.
timer->start(1000);
//After one sec
SomeOtherFunction(a);
}
This method is actually a slot th...
2
Solved
I'm using pyside but (I think) is a generic Qt question.
I know that QThread implementation calls ._exec() method so we should have an event loop on a started QThread. This way we can use QTimer ...
1
© 2022 - 2024 — McMap. All rights reserved.