All Questions
839
questions
0
votes
0
answers
26
views
Passing a QPromise to a QThread via queued signal
I have a main thread and a QThread that are running in my C++/Qt application. At some point, I want to send data to the QThread and get a result back. I thought that using QPromise would be a good way ...
0
votes
2
answers
49
views
The signal emmited from UnixDomain datagram socket server running on a QThread never received
The Files which I've created
I've created WorkerThread class extended QThread as follow:
// https://stackoverflow.com/a/14546167/11073131
#ifndef THREAD_H
#define THREAD_H
#include <QThread>
#...
0
votes
0
answers
40
views
Ensuring two task in a QThread don't overlap
I'm writing an application using PyQt6 to monitor and control an external serial device, and thus I need to send both read and write instructions, taking around 100ms to get a response.
I've created a ...
0
votes
0
answers
87
views
thread crashes with SIGSEGV or SIGABRT
I am writing a python wrapper for rsync (one more ;-) and use Qt to display the output of rsync. I realize that when have verbose output for each file my program crashes with SIGSEGV or SIGABRT. I ...
-3
votes
1
answer
87
views
How to block a thread until a slot is received
I'm using Qt 6.6.1.
I defined a class MyThread:
class MyThread: public QThread
As an inner class, I defined a class WakeUpEvent in the private section of the .h file:
private:
class WakeUpEvent : ...
0
votes
0
answers
92
views
QNetworkReply readyRead signal and read&readAll function crashes in multi-threaded environment
I tried to start the HTTP protocol in a thread to download a file, but I found that QNetworkReply calling the read or readAll method in a multithreaded environment would cause the program to crash. It ...
0
votes
0
answers
49
views
QT passing data between threads, worker function doWork() doesn't start
I'm new in Qt and I have a problem. I'm trying send data from worker thread using signal dataReady to slot in mainwindow updateData.
My problem is that my doWork function doesn't starts and don't emit ...
3
votes
1
answer
461
views
Can not change media using setSource() in pyside6
I have some video clips named 0.mp4, 1.mp4, 2.mp4... and I am using QMediaPlayer in PySide6.
I want to write a media player which can play videos one by one. At the end of each video clip, I use the '...
0
votes
1
answer
179
views
Can I call a QObject method from main thread after moveToThread() method is called?
I have a worker class
class Worker(QObject):
finished = Signal()
def __init__(self, n):
super().__init__()
self.a_flag = False
# self.mutex = QMutex()
# @Slot()
...
0
votes
1
answer
97
views
Multithreading using QxOrm MONGODB, using different databases for each thread
According to QxOrm manuals : 3.2 and 3.22,
it seems to be possible to use
qx::QxSqlDatabase::getSingleton()->setDatabaseName("./test_qxorm.db");
qx::QxSqlDatabase::getSingleton()->...
0
votes
0
answers
99
views
Change IP and/or port for gRPC client
I use C++ gRPC client in unary mode. I use CompletionQueue (cq), create loop with cq->Next() check in a separate thread (QThread::create()). I can interrupt this loop via cq->Shutdown() and then ...
0
votes
0
answers
60
views
How do I properly stop new qthread after it receives signal from main thread?
I have 2 threads in my Qt app. Main thread and myThread. I want myThread to stop whenever it receives workFinished signal from corresponding Worker class OR when it receives stopMyThread signal from ...
3
votes
0
answers
95
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 ...
0
votes
1
answer
69
views
QT5's QApplication::setOverrideCursor(Qt::WaitCursor); is blocking the previous operations
In my loadDatabase function, I have clearly set the status to display the message "loading coverage database..." before setOverrideCursor(Qt::WaitCursor), but the status bar is only ...
0
votes
0
answers
457
views
Calling exit/quit on QThread is not exiting the event loop and not stopping the worker [duplicate]
Addressing concerns of "duplicate question" - thank you for properly reading my question:
Cannot terminate PyQT QThread - Uses terminate(), something I clearly said that I do not want to ...