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