Please excuse my ignorance, but I'm not quite following. To keep things simple, here's the code:
bool MyCanvas::HorizonDialog()
{
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->setWindowTitle("New Horizon");
ok->setDefault(true);
connect(ok,SIGNAL(clicked()),dlg,SLOT(close()));
connect(ok,SIGNAL(clicked()),this,SLOT(NewHorizon()));
layout->addWidget(text);
layout->addWidget(ok);
layout->addWidget(cancel);
dlg->setLayout(layout);
dlg->raise();
dlg->show();
return true;
}
bool MyCanvas::HorizonDialog()
{
QDialog* dlg = new QDialog(this);
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->setWindowTitle("New Horizon");
QHBoxLayout* layout = new QHBoxLayout;
QPushButton* ok = new QPushButton("OK",dlg);
ok->setDefault(true);
connect(ok,SIGNAL(clicked()),dlg,SLOT(close()));
connect(ok,SIGNAL(clicked()),this,SLOT(NewHorizon()));
QPushButton* cancel = new QPushButton("Cancel",dlg);
QLineEdit* text = new QLineEdit(dlg);
layout->addWidget(text);
layout->addWidget(ok);
layout->addWidget(cancel);
dlg->setLayout(layout);
dlg->raise();
dlg->show();
return true;
}
To copy to clipboard, switch view to plain text mode
Are you suggesting placing a
connect(ok,SIGNAL(clicked()), //.... I honestly don't know what to connect that signal to.
connect(ok,SIGNAL(clicked()), //.... I honestly don't know what to connect that signal to.
To copy to clipboard, switch view to plain text mode
Bookmarks