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. [Solved]Signal slot mechanism across classes not working
Forum Updated to NodeBB v4.3 + New Features

[Solved]Signal slot mechanism across classes not working

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 993 Views 1 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.
  • musimbateM Offline
    musimbateM Offline
    musimbate
    wrote on last edited by
    #1

    I have a big application i am working on lately,and I am focusing on GUI customization.In the gui classes of the project I have a pushbutton that I use to trigger a mechanism that is implemented in another class that uses delegates.Here is my code section for the connection:
    @ connect(UBApplication::boardController->paletteManager()->getRemovePageButton(),SIGNAL(clicked()),
    this,SLOT(clickEmulate()));@

    The first pointer points to my GUI pushbutton and the second slot emulates a click on a delegate button .In that slot I simply call the function below to emit the clicked signal on the delegate button.
    @void DelegateButton::simulateClickOnCrossButton()
    {
    emit clicked();
    }@

    The project compiles and runs but nothing happens on the button click.The Q_OBJECT macro is present in the code and I am running qmake on every compile i am doing.

    Any Ideas or hints on how to handle this would be appreciated.I am not very comfortable with delegates and I think the problem might be there somehow.

    Thanks.

    Why join the navy if you can be a pirate?-Steve Jobs

    1 Reply Last reply
    0
    • musimbateM Offline
      musimbateM Offline
      musimbate
      wrote on last edited by
      #2

      Nailed it,was operating on the wrong class.Sorry.

      Why join the navy if you can be a pirate?-Steve Jobs

      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