QT作业(第一天)

#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    this->resize(1000,800);
    this->setWindowTitle("homework");
    this->setWindowIcon(QIcon("./water.pgn"));
    this->setFixedSize(QSize(300,200));
    this->setWindowOpacity(1);
    QLabel *lab1=new QLabel("logon:",this);
    QLabel *lab2=new QLabel("passwd:",this);

    lab1->resize(50,30);
    lab2->resize(70,30);

    lab1->move(50,50);
    lab2->move(50,100);

    QLineEdit *ledit1=new QLineEdit(this);
    ledit1->resize(150,30);
    QLineEdit *ledit2=new QLineEdit(this);
    ledit2->setEchoMode(QLineEdit::Password);
    ledit2->resize(150,30);
    ledit1->move(125,50);
    ledit2->move(125,100);
    QPushButton *qpush1=new QPushButton(this);
    qpush1->setText("cancel");
    qpush1->resize(70,30);
    qpush1->move(70,150);
    QPushButton *qpush2=new QPushButton(this);
    qpush2->setText("ok");
    qpush2->resize(70,30);
    qpush2->move(170,150);

}

MainWindow::~MainWindow()
{
}

你可能感兴趣的:(数据库)