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

怎么介绍自己做的企业网站页面360免费wifi为什么老掉线

怎么介绍自己做的企业网站页面,360免费wifi为什么老掉线,网站制作模板教案,宝塔搭建网站网页右下角上经常会出现一些提示性的信息#xff0c;B/S有的东西#xff0c;C/S当然也可以有#xff0c;就像QQ的消息提示一样#xff01; 实现一个类似的东西并不困难#xff0c;只要想明白原理实现起来就很简单了#xff01; 实现原理#xff1a; #xff08;1#…网页右下角上经常会出现一些提示性的信息B/S有的东西C/S当然也可以有就像QQ的消息提示一样 实现一个类似的东西并不困难只要想明白原理实现起来就很简单了 实现原理 1显示右下角缓慢弹出定时器启动逐渐改变位置即可到达相应位置停止计时器 2驻留定时器启动让界面停留一定的时间相应的时间过后停止定时器 3退出可以直接退出也可以采用改变透明度的形式模糊退出 标题栏 #include message_title.h #include setting.h MessageTitle::MessageTitle(QWidget *parent): QWidget(parent) {setFixedHeight(30);title_label new QLabel();close_button new PushButton();layout new QHBoxLayout();  title_label-setObjectName(QString::fromUtf8(labelOne));QFont title_font title_label-font();title_font.setBold(true);title_label-setFont(title_font);close_button-loadPixmap(tipclose);close_button-setToolTip(tr(close));layout-addWidget(title_label);layout-addStretch();layout-addWidget(close_button);layout-setMargin(0);setLayout(layout);connect(close_button, SIGNAL(clicked()), this, SIGNAL(myClose())); } void MessageTitle::paintEvent(QPaintEvent *) {QLinearGradient linear(rect().topLeft(), rect().bottomRight());linear.setColorAt(0, QColor(55, 135, 215));linear.setColorAt(0.5, QColor(140, 120, 185));linear.setColorAt(1, QColor(55, 135, 215));QPainter painter(this);painter.setBrush(QBrush(linear));painter.setPen(Qt::NoPen);painter.drawRect(rect()); } void MessageTitle::setTitleText(QString title) {title_label-setText(title); } 弹出框界面#include message_widget.hMessageWidget::MessageWidget(QWidget *parent): QWidget(parent) {setFixedSize(300, 180);setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);message_title new MessageTitle();content_label new QLabel();icon_label new QLabel();timer_show new QTimer(this);timer_stay new QTimer(this);timer_close new QTimer(this);time_count 0;transparent 1.0;desktop_height QApplication::desktop()-height();icon_label-setFixedSize(64, 64);content_label-setWordWrap(true);content_label-setAlignment(Qt::AlignTop);QVBoxLayout *v_layout new QVBoxLayout();v_layout-addWidget(icon_label);v_layout-addStretch();QVBoxLayout *v_layout2 new QVBoxLayout();QSpacerItem *spacerItem new QSpacerItem(20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum);v_layout2-addSpacerItem(spacerItem);v_layout2-addWidget(content_label);QHBoxLayout *h_layout new QHBoxLayout();h_layout-addLayout(v_layout);h_layout-addLayout(v_layout2);QMargins margins h_layout-contentsMargins();margins.setTop(20);margins.setLeft(10);margins.setRight(10);h_layout-setContentsMargins(margins);QVBoxLayout *main_layout new QVBoxLayout();main_layout-setMargin(0);main_layout-addWidget(message_title);main_layout-addLayout(h_layout);setLayout(main_layout);connect(timer_show, SIGNAL(timeout()), this, SLOT(myMove()));connect(timer_stay, SIGNAL(timeout()), this, SLOT(myStay()));connect(timer_close, SIGNAL(timeout()), this, SLOT(myClose()));connect(message_title, SIGNAL(myClose()), this, SLOT(close())); }void MessageWidget::showMsg(QString title, QString content) {QPixmap pixmap(:/icon/win);icon_label-setPixmap(pixmap);message_title-setTitleText( title);content_label-setText( content);this-showMessage(); }void MessageWidget::paintEvent(QPaintEvent *) {QBitmap bitmap(this-size());bitmap.fill(Qt::white);QPainter painter(this);painter.setBrush(QBrush(QColor(250, 240, 230)));painter.setPen(QPen(QBrush(QColor(55, 135, 215)), 6));painter.drawRoundedRect(bitmap.rect(), 5, 5);setMask(bitmap); } void MessageWidget::showMessage() {time_count 0;transparent 1.0;desktop_height QApplication::desktop()-height();timer_show-stop();timer_stay-stop();timer_close-stop();setWindowOpacity(1);QDesktopWidget *desktop QApplication::desktop();desk_rect desktop-availableGeometry();normal_point.setX(desk_rect.width() - rect().width());normal_point.setY(desk_rect.height() - rect().height());move(normal_point.x(), normal_point.y());showNormal();timer_show-start(5); }void MessageWidget::myMove() {desktop_height--;move(normal_point.x(), desktop_height);if(desktop_height normal_point.y()){timer_show-stop();timer_stay-start(1000);} }void MessageWidget::myStay() {time_count;if(time_count 9){timer_stay-stop();timer_close-start(200);} }void MessageWidget::myClose() {transparent - 0.1;if(transparent 0.0){timer_close-stop();this-close();}else{setWindowOpacity(transparent);} }
http://www.pierceye.com/news/293367/

相关文章:

  • 东莞网站的建设重庆妇科医院哪家好医院公立医院
  • 北京用网站模板建站wordpress中文 插件下载
  • 做网站公司哪家正规重庆网站建设重庆
  • 网站转备案申请学校网站建设申请书
  • 宜昌网站建设选择宜昌慧享互动线上店免费推广的软件
  • 网站建设主流语言织梦网站流动广告代码
  • 南京做网站公司哪个网站上做ppt比较好看的
  • 在服务器上搭建网站中国建设银行淮南分行网站
  • 网站建设什么服务器品牌哪个好南京企业制作网站
  • 太原有哪些做网站的公司如何伪原创 网站
  • 设计好的网站网站策划方案详解
  • 建网站潞城哪家强?企业网络推广技巧
  • 怎么建设网站让国外看wordpress 公司内网
  • 虚拟主机购买网站网站值不值得做seo
  • 长沙网站排名优化如何在网站做电子杂志
  • 石家庄科技网站在线解压zip网站
  • 不良网站举报中心官网做网站必须买云虚拟主机吗
  • 网站建设实习wordpress 登陆 插件下载
  • 做耳鼻喉医院网站多少钱北京网站建设营销
  • 济南网站建设就选搜点网络ok外贸平台补贴政策
  • 网站建设 学校百度快照优化培训班
  • 做阀门的英文网站怎么写西安seo服务公司排名
  • 淘宝客网站如何做推广古董手表网站
  • 网站虚拟主机查询企业文化建设的内容有哪些
  • 财经大学网站建设apicloud wordpress
  • 平面设计网站排行榜刚进外贸公司一个月多少钱
  • 企业网站最下面的那栏叫啥广州编程培训机构哪里好
  • 怎么学建设网站网站建设敬请期待图片素材
  • 滴滴出行的网站是哪家公司做的新媒体营销课程心得体会
  • 中国室内设计师联盟网站浙江手机版建站系统开发