(C++) slots

February 24, 2017 · View on GitHub

 

 

 

 

 

(C++) slots

 

slots is a Qt keyword to declare slots, so Qt signals can be connected with them.

 

In the example below (from How to StretchDraw an image?), the slot 'onTimer' is declared. Probably there's a timer that needs to call the onTimer slot (note: there is in the full example).

 


#ifndef DIALOGBLOCKYRECT_H #define DIALOGBLOCKYRECT_H #include <QDialog> namespace Ui {   class MyClass; } class MyClass : public QDialog {   Q_OBJECT   //Lots of MyClass code   private slots:     void onTimer(); };