Quote Originally Posted by chrisb123 View Post
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 
Didn't read up all if you actually fixed your problem already but:
Qt Code:
  1. myQtApp *dialog = new myQtApp(this);
  2. dialog->setAttribute(Qt::WA_DeleteOnClose);
  3. dialog->show();
To copy to clipboard, switch view to plain text mode 

this would solve your problem with deleting dialog.