qthread Questions
6
Solved
I am trying to start a QTimer in a specific thread. However, the timer does not seem to execute and nothing is printing out. Is it something to do with the timer, the slot or the thread?
main.cpp
...
Shayna asked 8/5, 2012 at 4:16
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
4
The problem I encountered is that I decided to implement QThreads the way they are supposed to, based on numerous articles:
https://www.qt.io/blog/2010/06/17/youre-doing-it-wrong
http://mayaposch.w...
1
Solved
0
I looked at this answer here which was very helpful, but it's not working as expected when trying to render a plot.
The plot is working but the progress bar is not progressing, it will just jump t...
Alcheringa asked 13/11, 2017 at 3:17
1
Solved
I've a class who create QRunnables and start them in a QThreadPool instance.
My threads are working well, but in case user want to quit application, the application takes a long time to stop. Cert...
3
Solved
I'm having trouble with Qt signals.
I don't understand how DirectConnection and QueuedConnection works?
I'd be thankful if someone will explain when to use which of these (sample code would be ap...
Stealth asked 24/2, 2013 at 12:7
5
I'm designing a GUI with PyQt where I need to display a matplotlib/pylab window when I click on a button that makes the plot of the data from a function I've created. It's like a runtime used in Ma...
Bodine asked 19/10, 2010 at 19:50
5
Solved
I am working with a 50 fps camera (in Ubuntu environment and Qt framework) and every 20 ms I get a frame to process.
I wrote a code to read images from camera and then store them in hard drive.
w...
2
I made a class derived from QAbstractListModel and re-implemented all the necessary functions. I create an object of it, fill in some initial data into the model (all beginInsertRows etc done) and ...
1
Solved
I am trying to figure out why this code crashes if I try to run the threads for a second time once they are completed.
The first time I click "Start 5 Threads" It runs just fine and finishes. But ...
3
Solved
Below is the code for my qthread implementation. I am trying to get gps data from satellite. QThread doesn't produce the finished() signal even when the programs exits gpsSearch() slot function. Th...
Fasciation asked 11/6, 2013 at 13:30
1
Solved
I would like to know how to properly stop a QThread. I havea infinite loop in a thread, and I would like to stop it when I do a specific action :
I have tried :
if (thread->isRunning()){...
2
I'm new to StackOverflow and wondering if I'm doing this right:
I'm writing a simple Qt application to test multi-threading (something I am also completely new to). I made a MainWindow that contai...
Milklivered asked 5/3, 2013 at 4:48
4
I have 2 Threads in a Qt5Application:
Thread A: contains a bunch of QObject derived class objects
Thread B: worker in this Thread has all the pointers to the objects in A
Thread A might be very ...
Sesqui asked 8/3, 2015 at 9:32
1
Suppose we wrote a non-const method in a QObject-deriving class:
class MyClass : public QObject {
int x;
public:
void method(int a) {
x = a; // and possibly other things
};
};
We want to mak...
Polliwog asked 2/11, 2016 at 14:44
3
Solved
I saw different topics on "pthread vs std::thread" and "QThread vs pthread" but none on "std::thread vs QThread".
I have to program a software to drive a 3D Printer and need to use threads. There ...
Kowtko asked 27/10, 2016 at 12:40
2
Solved
I'm trying to do a fairly common thing in my PySide GUI application: I want to delegate some CPU-Intensive task to a background thread so that my GUI stays responsive and could even display a progr...
1
I have an QThread which listen server. I want to pause work of QThread immediately. Not waiting at all, but almost like terminating, it must be immediate.
1
I've got a threaded server.
QTcpSocket needs to be created on the thread it needs to be ran on, FI: Qt - Handle QTcpSocket in a new thread by passing the socket descriptor.
My problem is that, I ...
Cullie asked 6/7, 2016 at 6:43
2
Created a QThread in main() i.e Main thread.
Moved a worker class to the new thread. The thread executes the 'StartThread' method of worker class.
Worker Thread:
//header file
class Worker : publ...
2
Solved
I wrote a thread that executes a worker object. Everything works fine. Also the resulting signals are emitted as they should. Of course I took care of the usual mistakes regarding thread/object aff...
Stome asked 6/12, 2014 at 20:54
2
Solved
3
Solved
I am looking for an answer if there is any difference between these two functions, aside from the constness of the first one:
QThread * QObject::thread() const
QThread * QThread::currentThread()
...
Bordereau asked 22/10, 2015 at 12:7
1
Is there any way we can pass a parameter to QThread when the thread is started (.start) ?
I found an example of using pyqt thread in stackoverflow, but I was wondering how to pass a parameter, in ...
© 2022 - 2024 — McMap. All rights reserved.