I understand how to use it, but the syntax of it bothers me. What is "private slots:" doing?
I have never seen something between the private keyword and the : in a class definition before. Is there some fancy C++ magic going on here?
And example here:
#include <QObject>
class Counter : public QObject
{
Q_OBJECT
public:
Counter() { m_value = 0; }
int value() const { return m_value; }
public slots:
void setValue(int value);
...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…