PDA

View Full Version : How to give mythread.cpp access to UI (the one in mainwindow.cpp)?



tahayassen
31st March 2013, 03:59
I tried following this: http://stackoverflow.com/questions/12801846/qt-i-cant-access-to-uis-widgets but it didn't work (I still had the same compiling errors as if I had done nothing)

Here is my project in a zip file: https://mega.co.nz/#!2xBhHRgI!aBK8JFP75u8Qx3XtWtD9KEkijlhUBTieA7QcSxr yLSA

ChrisW67
1st April 2013, 04:24
I do not propose to agree to the TOS of some random site to download and debug your entire program for you.

There's no magic just basic C++. If you want to access data from an object you need to provide an access function of some sort. If, as it would appear, you are accessing data from another thread then you must be very careful about synchronisation of readers and writers.