In my project is based on the Linux OS and I have two parts of code.
One GUI implemented with QT and the other part is Libraries implemented using Standard C++(these libraries used across multiple systems to communicate, We can't replace with Qthreads) using pthread.
To make Qt successfully call the library, I add "-lpthread" in Qt's .pro file.
When I run Qt, problems come. Sometimes Qt is crashing in GUI update function.
ProcessStatusDetails function is called pthred to update the status on to GUI
int ProcessStatusDetails(StatusDetails* Status,std::string& StatusMsg)
{
int Erc;
pthread_mutex_lock( &mutex1 );
Erc = pMainWindow->UpdateGuiDetails(PisStatus,StatusMsg);
pthread_mutex_unlock( &mutex1 );
}
Could some one help me how to signal the GUI update from Pthread function.?
Bookmarks