Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Forward Slot from Class to other Class

Forward Slot from Class to other Class

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 704 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    HappyCoder
    wrote on last edited by
    #1

    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?

    Regards
    Stefan

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mcosta
      wrote on last edited by mcosta
      #2

      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?

      Once your problem is solved don't forget to:

      • Mark the thread as SOLVED using the Topic Tool menu
      • Vote up the answer(s) that helped you to solve the issue

      You can embed images using (http://imgur.com/) or (http://postimage.org/)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved