当前位置: 首页 > news >正文

哪些网站是营销型网站全网推广平台

哪些网站是营销型网站,全网推广平台,网站建设设计 网络服务,燕郊网站建设公司实现效果: 点击登录,检验用户密码是否正确,正确则弹出消息框,点击ok转到另一个页面 不正确跳出错误消息框,默认选线为Cancel,点击Yes继续登录 点击Cancel跳出问题消息框,默认选项No&#xff0c…

实现效果:

点击登录,检验用户密码是否正确,正确则弹出消息框,点击ok转到另一个页面

不正确跳出错误消息框,默认选线为Cancel,点击Yes继续登录

点击Cancel跳出问题消息框,默认选项No,单击yes,退出程序,单击No继续登录

以下是实现的部分代码

widget.h

#ifndef WIDGET_H
#define WIDGET_H#include <QWidget>  //基类QWidget的头文件
#include<QDebug>   //信息调试类,用于输出数据使用
#include<QIcon>
#include<QPushButton>
#include<QLabel>
#include<QLineEdit>
#include<QPixmap>
#include"enter_widget.h"
#include"communication.h"
#include<QMessageBox>
class Widget : public QWidget
{Q_OBJECT   //QT的信号与槽元对象public:Widget(QWidget *parent = nullptr);//默认参数构造函数声明~Widget();//虚析构声明
private:QLabel *pic;QLabel *tx;QPushButton* enter;QPushButton* login;QPushButton* question;QLabel* user;QLabel* passwd;QLineEdit* user_l;QLineEdit* passwd_l;enter_widget* en;QTimer * time;
};
#endif // WIDGET_H

widget.cpp

#include "widget.h"
#include<QDebug>
Widget::Widget(QWidget *parent): QWidget(parent)
{qDebug()<<this->size();   //获取当前姐买你的尺寸qDebug()<<this->width();  //获取当前组件的宽度qDebug()<<this->height(); //获取当前组件的高度this->setWindowTitle("QQ");//this->resize(500,400);//重新设置界面大小//this->resize(QSize(1000,1000));this->setFixedSize(500,400);//设置固定的界面大小//this->setMaximumSize(600,700);//最大界面大小//this->setMinimumSize(200,300);//最小界面大小this->setWindowIcon(QIcon("://msg/qq.png"));pic = new QLabel(this);pic->resize(this->width(),130);pic->setPixmap(QPixmap("://msg/fm.png"));pic->setScaledContents(true);tx = new QLabel(this);tx->resize(100,100);tx->move(200,60);tx->setPixmap(QPixmap("://msg/2.jpg"));tx->setScaledContents(true);enter = new QPushButton;enter->setParent(this);enter->setText("登录");enter->resize(100,50);enter->move(120,300);enter->setIcon(QIcon("://msg/enter.png"));enter->setStyleSheet("border:0px solid black;border-radius:10;background-color:#FFFFFF");login = new QPushButton;login->setParent(this);login->setText("注册");login->resize(100,50);login->move(280,300);login->setIcon(QIcon("://msg/enter.png"));login->setStyleSheet("border:0px solid black;border-radius:10;background-color:#FFFFFF");//    question = new QPushButton;
//    question->setParent(this);
//    question->setText("问题");
//    question->resize(50,50);
//    question->move(390,300);
//    question->setStyleSheet("border:0px solid black;border-radius:10;background-color:#FFFFFF");user = new QLabel;user->setParent(this);user->setText("用户名:");user->resize(60,30);user->setAlignment(Qt::AlignCenter);//user->setFixedSize(50,20);user->move(enter->x(),enter->y()-120);passwd = new QLabel(this);passwd->setText("密 码:");passwd->resize(60,30);passwd->setAlignment(Qt::AlignCenter);//user->setFixedSize(50,20);passwd->move(enter->x(),enter->y()-60);user_l = new QLineEdit(this);user_l->resize(200,30);user_l->move(user->x()+60,user->y());user_l->setPlaceholderText("请输入用户名");user_l->setStyleSheet("border:0px solid black;border-radius:10;background-color:#b0bfbf");passwd_l= new QLineEdit(this);passwd_l->resize(200,30);passwd_l->move(passwd->x()+60,passwd->y());passwd_l->setPlaceholderText("请输入密码");passwd_l->setEchoMode(QLineEdit::Password);passwd_l->setStyleSheet("border:0px solid black;border-radius:10;background-color:#b0bfbf");//切换界面//会话界面en = new enter_widget;//交流界面com = new communication;connect(enter,&QPushButton::clicked,[=](){if(user_l->text()==QString("admin") && passwd_l->text() == "123456"){QMessageBox succbox(QMessageBox::NoIcon,"登录","登录成功",QMessageBox::Ok,enter);int err = succbox.exec();if(err == QMessageBox::Ok){this->close();com->show();}}else{int err = QMessageBox::critical(this,tr("错误"),tr("账号密码不匹配,是否重新登录"),QMessageBox::Yes | QMessageBox::Cancel,QMessageBox::Cancel);if(err == QMessageBox::Cancel){int ques = QMessageBox::question(this,tr("问题"),tr("是否退出"),QMessageBox::Yes | QMessageBox::No,QMessageBox::No);if(ques == QMessageBox::Yes){this->close();}}this->user_l->clear();this->passwd_l->clear();}});}
Widget::~Widget()
{
}

http://www.hkea.cn/news/732295/

相关文章:

  • 嘉兴建站软件如何做好企业网站的推广
  • 在凡科做网站短视频推广
  • 深圳推广公司推荐q群排名优化软件
  • 什么网站做简历模板宁德市医院
  • 用什么软件做公司网站游戏推广赚佣金的平台
  • 购物网站 后台模板河北seo技术培训
  • 聊城建设委员会官方网站google seo
  • 广西建设网郭业棚seo推广具体做什么
  • 武汉网站seo诊断谷歌下载官网
  • 做地方网站能赚钱吗免费seo网站诊断
  • 图片设计在线网站推广优化外包便宜
  • 武汉平价做网站网络软文推广案例
  • 新产品线上推广方案鞍山seo外包
  • 网站建网站建设和优佛山网络推广培训
  • 毕业设计做网站怎么样微信crm管理系统
  • 个人网站开发多少钱电脑培训班零基础
  • 互联网有哪些岗位宁波免费seo在线优化
  • 惠州做棋牌网站建设哪家技术好哪里的网络推广培训好
  • 如何做线上赌博的网站推广策略有哪些方法
  • 男的女的做那个视频网站百度收录需要多久
  • 大通县wap网站建设公司网站免费制作
  • 哪个网站教做公众号甘肃百度推广电话
  • 网站怎么让百度收录广告网络推广
  • 小型网站设计及建设论文定制网站制作公司
  • 视频网站建设费用排名优化网站seo排名
  • 怎么自己做网站服务器linux百度账号查询
  • 梧州网站推广方案百度热搜 百度指数
  • 网站不兼容ie6自助建站模板
  • 甘肃网站建设公司百中搜优化软件
  • 国内外贸网站建设公司seo教程 百度网盘