How to use a specialization of an C++ interface?

  • Very straight forward case, I register like:

        "InputDeviceConfiguratorGate", 1, 0, "InputDeviceConfiguratorGate", "Not creatable in Qml." );
        "JoystickDeviceConfigurator", 1, 0, "JoystickDeviceConfigurator", "Not creatable in Qml." );

    JoystickDeviceConfigurator is derived publicly from InputDeviceConfiguratorGate.

    At runtime I get the following error:

    QMetaType::registerTypedef: -- Type name 'InputDeviceConfiguratorGate*' previously registered as typedef of 'InputDeviceConfiguratorGate*' [1049], now registering as typedef of 'JoystickDeviceConfigurator*' [1051].

    I actually would like to have InputDeviceConfiguratorGate registered as interface. The question was asked

  • @c64zottel Ok, I figured it out. My mistake is a missing Q_OBJECT declaration in the JoystickDeviceConfigurator:

    class JoystickDeviceConfigurator : public InputDeviceConfiguratorGate

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.