Forward Slot from Class to other Class

  • Hi,

    my class "Manager" has a slot " void setVisibleItem(bool on)" and a subclass the slot setVisible(bool on).
    Now i tried to connect both slots like this:

    connect(this, SLOT(setVisibleItem(bool)), SM_Item, SLOT(setVisible(bool)));

    i get the error message
    undefiend reference to 'Manager::setVisibleitem(bool).

    How can i forward a slot?


  • Hi and welcome to devnet,

    You can forward signals but not slots. IfsetVisibleItem() does nothing you can avoid it forwarding the signal to the sublass.
    When is that slot called?

Log in to reply

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