How to defined the MACRO CODE for the slots functions?
-
I dont want to write so many same codes.
So i wrote the macro code like this:#define DEFINED_SLOT(Func,TYPE) \ private slots: void slotReady(TYPE value);
When i using these codes ,it seemd dosent work.So how to fix it?
Or how to wrote for the signal functions by using the macro code? -
This will only work when you use the new signal/slot syntax since moc can't parse this. Also I don't see
a bigany advantage of your macro. -
I just want to save some time.I dont want to write so many the same codes.
So anything else to make it possible to solve the problem? -
its the only way to make templated/macroed slots/signals classes/functions
-
@nicker-player said in How to defined the MACRO CODE for the slots functions?:
I dont want to write so many the same codes.
What exactly do you think you're saving here? I would guess the time discussing here is already much more than you're saving.