Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. void login_card1::on_pushButton_clicked(){
  2.  
  3. QString us;
  4. QSqlQuery q;
  5. portal k;
  6. q.prepare("select * from login where username = ? and password = ?");
  7. q.addBindValue(ui->lineEdit->text());
  8. q.addBindValue(ui->lineEdit_2->text());
  9. if(q.exec())
  10. {
  11. if(q.next())
  12. {
  13. us = ui->lineEdit->text();
  14. k.labeltext(us);
  15. ui->output->append("Welcome, opening portal...");
  16. portal p;
  17. p.setModal(this);
  18. p.exec();
  19.  
  20. }
  21. else if(ui->lineEdit->text().isEmpty())
  22. {
  23. ui->output->append("please enter your username and passwordnif you are a hacker please wait in the OFFICE ROOM...");
  24. }
  25. else
  26. {
  27. ui->output->append("incorrect username or password, please try again...");
  28. }
  29.  
  30.  
  31.  
  32. }}
  33.  
  34. void portal::labeltext(QString u){
  35. ui->label_2->setText(u);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement