I made a plasma app that opens a settings dialog
I'm trying to close a dialog with a close button
If I open it like this

Qt Code:
  1. void test::settings() {
  2. myQtApp *dialog = new myQtApp;
  3. dialog->show();
  4. }
To copy to clipboard, switch view to plain text mode 

How can i close it like this

Qt Code:
  1. myQtApp::myQtApp(QWidget *parent)
  2. {
  3. setupUi(this);
  4. connect( pushButton_close, SIGNAL( clicked() ), this, SLOT( close() ) );
  5. }
  6. void myQtApp::close() {
  7. QMessageBox::about(this,"close",
  8. "this shold close the dialog");
  9. }
To copy to clipboard, switch view to plain text mode