dcsimg
Login | Register   
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: C++
Expertise: Beginner
Aug 10, 2000

WEBINAR:

On-Demand

Application Security Testing: An Integral Part of DevOps


Signals and Public Slots Blocks

Question:
Everybody knows the meaning of public, private, and protected blocks in a class interface. While browsing through a KDE program I found two other block types: signals and public slots. What do they mean? Is this a special thing of Qt? If so, how do they make it possible?

Answer:
Qt isn't C++, but a variant dialect called "moc" that defines three new keywords: signals, slots, and emit. Explaining the semantics and usage of these non-standard keywords is beyond the scope of this forum, but essentially, they are used in firing and handling events, and relating these events to a particular class and method. The Qt framework contains special header files to implement these extensions using the preprocessor.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date