Connect Issue

I've written a few scripts in the past however, I'm new to plugin development.  I'm able to use connect in the scripts with out a problem but when I try to use connect in the sample projects, it doesn't seem to work.  For example in the "A First Plugin", in the dilaog cpp constructor, I create a button and use connect(btn, SIGNAL(clicked()), this, SLOT(doClicked()));  and add doClicked() function to the class and in that function I create a QMessageBox. doClicked never gets called. I know there's something simple I'm missing.  Any help would be appreciated.

 

Comments

  • Solved:  I figured out that I wasn't declaring the doClick as a public slot: in the header file.

     

  • billh4321billh4321 Posts: 20
    edited September 2015

    Ok, I have found that when using the example "A Simple Plugin", if I put the connect in the Action class, it works however if I put it in the dialog class it doesen't. I have also tried moving the slot in to the Action class, still didn't work. Can anyone clarify?  Is this because it's in a Qt QDialog class and not in a Dz class?

    Post edited by billh4321 on
  • Identified the issue.  the moc files were not getting updated.

Sign In or Register to comment.