Hello.
I wanna make a connection between two functions in different files with differents Dialogs (QDialog and QMainWindow).
File # 1.
The function database.Users() establish a conection with a mysql server, and if the user is Ok, then return 0.
The next step is call the function showPrivileges() on MainWindow.cpp file.
connectDialog.cpp
void connectDialog::login()
{
if (database.Users() == 0){
<< here.. >>
this.close();
}
else
ui->labelUserError->setVisible(true);
}
void connectDialog::login()
{
if (database.Users() == 0){
<< here.. >>
this.close();
}
else
ui->labelUserError->setVisible(true);
}
To copy to clipboard, switch view to plain text mode
File # 2
See the showPrivileges() function in MainWindow, this make two labels visible in MainWindow form.
MainWindow.cpp
void MainWindow::showPrivileges()
{
ui->label0->setVisible(true);
ui->label1->setEnabled(true);
}
void MainWindow::showPrivileges()
{
ui->label0->setVisible(true);
ui->label1->setEnabled(true);
}
To copy to clipboard, switch view to plain text mode
I wanna call the function void MainWindow::showPrivileges() in real time, execution time..
From the if sentence in void connectDialog::login() function before of the line this.close();
I don't know how do this. Please help me.
Thanks...
Bookmarks