Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [Solved]Signal slot mechanism across classes not working

    General and Desktop
    1
    2
    825
    Loading More Posts
    • 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.
    • musimbate
      musimbate last edited by

      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 Reply Quote 0
      • musimbate
        musimbate last edited by

        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 Reply Quote 0
        • First post
          Last post