maartenS
5th September 2008, 21:23
Hi
I'm trying to connect two dialogs by clicking a button on the first dialog.
For both dialogs I created slots in mainwindow.cpp. I would like to do something like:
void MainWindow::userDialogExec()
{
if (userDialog_p->exec()) {
mainInputWidget_p->updateForm();
}
}
void MainWindow::profileDialogExec()
{
if (profileDialog_p->exec()) {
connect (profileDialog_p->addButton, SIGNAL(clicked()), this, SLOT(userDialogExec()));
}
}
but profileDialog_p has no member named addButton. I made this form with designer so I should do probably something like profileDialog_p->ui.addButton, but that doesn't work since ui is private and I want to keep it private.
Any ideas?
thanks in andvance,
I'm trying to connect two dialogs by clicking a button on the first dialog.
For both dialogs I created slots in mainwindow.cpp. I would like to do something like:
void MainWindow::userDialogExec()
{
if (userDialog_p->exec()) {
mainInputWidget_p->updateForm();
}
}
void MainWindow::profileDialogExec()
{
if (profileDialog_p->exec()) {
connect (profileDialog_p->addButton, SIGNAL(clicked()), this, SLOT(userDialogExec()));
}
}
but profileDialog_p has no member named addButton. I made this form with designer so I should do probably something like profileDialog_p->ui.addButton, but that doesn't work since ui is private and I want to keep it private.
Any ideas?
thanks in andvance,