Home > Mobile > QT5.8 thread USES the main interface control, to make the main interface related controls inside the
QT5.8 thread USES the main interface control, to make the main interface related controls inside the
Time:09-29
Use graphicsView control display images, but can't change by thread operation function display images, is always an error, by slot function display video delay is too high, frames one gao hang up,
What I need is posted in a thread while modifying interface controls image directly,
Attached function operation code: # include "MyThread. H" # include & lt; QDebug> # include & lt; QMutex> # include & lt; QThread>
MyThread: : MyThread (MainWindow * UI) { This - & gt; Win=UI; The connect (this, SIGNAL (bar_sig ()), and this, SLOT (bar_slot ())); IsStop=false; } MyThread: : ~ MyThread () {
}
Void MyThread: : closeThread () { IsStop=true; }
Void MyThread: : pauses () { This - & gt; The lock (); pause. }