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


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

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