SHARE
TWEET

Untitled

kalo93 Jun 20th, 2018 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Login.h
  2. #ifndef LOGIN_H
  3. #define LOGIN_H
  4.  
  5. #include <QMainWindow>
  6. #include <QDebug>
  7. #include <QtSql>
  8. #include <QFileInfo>
  9.  
  10. namespace Ui {
  11. class login;
  12. }
  13.  
  14. class login : public QMainWindow
  15. {
  16.     Q_OBJECT
  17.  
  18. public:
  19.     explicit login(QWidget *parent = 0);
  20.     ~login();
  21.  
  22. private slots:
  23.     void on_pushButton_clicked();
  24.  
  25.     void on_pushButton_2_clicked();
  26.  
  27. private:
  28.     Ui::login *ui;
  29.     QSqlDatabase myDB;
  30. };
  31.  
  32. #endif // LOGIN_H
  33.  
  34. log.pro
  35.  
  36. #-------------------------------------------------
  37. #qwdqw0000
  38. # Project created by QtCreator 2018-06-20T09:36:38
  39. #
  40. #-------------------------------------------------
  41.  
  42. QT       += core gui sql
  43.  
  44. greaterThan(QT_MAJOR_VERSION, 4):  QT += widgets
  45.  
  46. TARGET = log
  47. TEMPLATE = app
  48.  
  49. # The following define makes your compiler emit warnings if you use
  50. # any feature of Qt which has been marked as deprecated (the exact warnings
  51. # depend on your compiler). Please consult the documentation of the
  52. # deprecated API in order to know how to port your code away from it.
  53. DEFINES += QT_DEPRECATED_WARNINGS
  54.  
  55. # You can also make your code fail to compile if you use deprecated APIs.
  56. # In order to do so, uncomment the following line.
  57. # You can also select to disable deprecated APIs only up to a certain version of Qt.
  58. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
  59.  
  60.  
  61. SOURCES += \
  62.         main.cpp \
  63.         login.cpp
  64.  
  65. HEADERS += \
  66.         login.h
  67.  
  68. FORMS += \
  69.         login.ui
  70.  
  71.  
  72.  
  73.  
  74.  
  75. login.cpp
  76.  
  77.  
  78.  
  79. #include "login.h"
  80. #include "ui_login.h"
  81.  
  82. login::login(QWidget *parent) :
  83.     QMainWindow(parent),
  84.     ui(new Ui::login)
  85. {
  86.     ui->setupUi(this);
  87. }
  88.  
  89. login::~login()
  90. {
  91.     delete ui;
  92. }
  93.  
  94. void login::on_pushButton_clicked()
  95. {
  96.  
  97. }
  98.  
  99. void login::on_pushButton_2_clicked()
  100. {
  101. ui->txtpass->setText("");
  102. ui->txtuser->setText("");
  103. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top