No no no... that's a wrong way. All you need to do for a slot or signal to be available in designer for a custom widget is to declare them as such in the class and remember about placing the Q_OBJECT macro. The same goes for properties - use the Q_PROPERTY macro. You seldom need to touch the member sheet extension.
class SomeWidget
: public QWidget { Q_OBJECT
Q_PROPERTY(int someProp READ getSomeProp WRITE setSomeProp)
public:
// ...
public slots:
void myCustomSlot() { ... }
signals:
void myCustomSignal(int);
};
class SomeWidget : public QWidget {
Q_OBJECT
Q_PROPERTY(int someProp READ getSomeProp WRITE setSomeProp)
public:
// ...
public slots:
void myCustomSlot() { ... }
signals:
void myCustomSignal(int);
};
To copy to clipboard, switch view to plain text mode
Bookmarks