Hi,
This compiles for me:
class SignalInterface
{
public:
virtual void mysignal() = 0;
};
class SignalImplementer : public QObject, public SignalInterface
{
Q_OBJECT
signals:
void mysignal() override;
};
However putting signals into an interface I think is rather dubious,
because you won't be able to connect through the interface. I.e. this:
SignalImplementer obj;
QObject::connect(this, &Session::opened, &obj, &SignalInterface::mysignal);
Is going to fail the static assertions in QObject::connect.
You could derive from QObject though and have them in an abstract class.
_______________________________________________
Interest mailing list
[email protected]
https://lists.qt-project.org/listinfo/interest