A problem in QT

Source: Internet
Author: User

1: This is a problem I encountered when reading a PDF of QT. The Code is as follows:

 

Mydlg my1;
If(my1.exe C () = qdialog: accepted)
{
W. Show ();
Return a.exe C ();
}

 

There is a button on my1, W is a widget, And the clicked signal of the button corresponds to the notify T () slot of my1. I can't understand this sentence after learning QT.

Now, the idea is almost plain. In this case, my1.exe C () indicates that my1 enters the modal mode. Show(writable parameters is a non-modeled mode. When my1.exe C needs to return, it can only accept the returned accept. Now it seems that accept is a built-in function and variable of qdialog.

What exec sees is that it enters the message loop state. This is probably the case. my1 enters the mode and waits for message processing. if it receives :: if accept is used, the corresponding event has occurred.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.