Home > Back-end >  I use QThread creates a thread, new inside a class, then the following connect my judgment is sent a
I use QThread creates a thread, new inside a class, then the following connect my judgment is sent a

Time:12-13


The connect (UI - & gt; LoginButton, & amp; QPushButton: : clicked, this, & amp; Widgets: : OnClickedLogin);

The connect (UI - & gt; LogoutButton, & amp; QPushButton: : clicked, this, & amp; Widgets: : OnClickedLogout);

The connect (UI - & gt; PreviewButton, & amp; QPushButton: : clicked, this, & amp; Widgets: : OnClickedPreview);

The connect (UI - & gt; StopPreviewButton, & amp; QPushButton: : clicked, this, & amp; Widgets: : OnClickedStopPreview);
The connect (UI - & gt; CaptureButton, & amp; QPushButton: : clicked, this, & amp; Widgets: : OnClickedCapture);





The class mythread: public QThread
{
Void the run ()
{
Widgets * w=new Widget;

W - & gt; Show ();
}
};


Int main (int arg c, char * argv [])
{
QApplication a (arg c, argv);
Mythread c;

C.s. tart ();

Return a.e xec ();
}



CodePudding user response:

Widget try using modal window open, it is estimated that threads run after release

CodePudding user response:

reference 1/f, it is a nice nickname response:
widgets in modal window opens a try, estimate the thread to run after the release of the
no release, debugging and running,,,
  • Related