vinny gracindo
20th October 2009, 11:20
I have the following function:
void MainWindow::OpenWindow(char a) {
Ui_Form_Usuario* wig;
switch(a) {
case 1: {
wig = new Ui_Form_Usuario;
break;
}
case 'b': {
wig = new Ui_Form_Motorista
break;
}
}
QWidget* owig = new QWidget(this);
wig->setupUi(owig);
owig->show();
}
If I pass parameter in the connection, it is underlined with a line. (It compiles, but does not work out).
QObject::connect(action_Usu_rio, SIGNAL(activated()), MainWindow, SLOT(OpenWindow()));
If I put in the function as openWindow a= 'u', go right and it opens a form.
help
void MainWindow::OpenWindow(char a) {
Ui_Form_Usuario* wig;
switch(a) {
case 1: {
wig = new Ui_Form_Usuario;
break;
}
case 'b': {
wig = new Ui_Form_Motorista
break;
}
}
QWidget* owig = new QWidget(this);
wig->setupUi(owig);
owig->show();
}
If I pass parameter in the connection, it is underlined with a line. (It compiles, but does not work out).
QObject::connect(action_Usu_rio, SIGNAL(activated()), MainWindow, SLOT(OpenWindow()));
If I put in the function as openWindow a= 'u', go right and it opens a form.
help