Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void login_card1::on_pushButton_clicked(){
- QString us;
- QSqlQuery q;
- portal k;
- q.prepare("select * from login where username = ? and password = ?");
- q.addBindValue(ui->lineEdit->text());
- q.addBindValue(ui->lineEdit_2->text());
- if(q.exec())
- {
- if(q.next())
- {
- us = ui->lineEdit->text();
- k.labeltext(us);
- ui->output->append("Welcome, opening portal...");
- portal p;
- p.setModal(this);
- p.exec();
- }
- else if(ui->lineEdit->text().isEmpty())
- {
- ui->output->append("please enter your username and passwordnif you are a hacker please wait in the OFFICE ROOM...");
- }
- else
- {
- ui->output->append("incorrect username or password, please try again...");
- }
- }}
- void portal::labeltext(QString u){
- ui->label_2->setText(u);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement