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

织梦网站如何做移动端惠州 家具 网站上线

织梦网站如何做移动端,惠州 家具 网站上线,dedecms 生成网站地图,wordpress迁移后栏目打开404网页右下角上经常会出现一些提示性的信息#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.huolong8.cn/news/273370/

相关文章:

  • 无锡做网站公司哪家好品牌网查询
  • 先学php还是网站建设seo基础知识
  • 合肥制作手机网站台州seo快速排名
  • 网站服务体系郑州做网站企业
  • 旅游酒店网站建设背景分析wordpress银行模板
  • php企业网站cms手机上自己设计房子软件
  • 做网站 php j2ee青岛房产交易中心官网
  • wordpress 建的网站中学生做网站的软件
  • seo站长工具查询app开发与网站开发
  • 桂林网站建站wordpress 固定链接 index.php
  • 卧龙区2015网站建设价格注册一个公司网站需要多少钱
  • 江苏景禾瑜博建设工程有限公司网站响应式企业网站开发所用的平台
  • 顺义网站建设推广优化seowordpress去谷歌
  • 国税网站建设调查报告wordpress 联系我们 制作
  • 徐州模板建站系统厦门市同安区建设局官方网站
  • asp网站 攻击wordpress表单拖拽
  • 成都网络营销网站泉州网站制作设计
  • 网站后台放在哪里dedeampz 安装wordpress教程
  • 莆田网站开发公司电话下载了源码怎么做网站
  • 做网站的标题图片郑州服装 网站建设
  • 个人做百度云下载网站河北住房和城乡建设部网站
  • 视频盗版网站怎么做墨刀制作网页教程
  • c 手机版网站开发超链接到网站怎么做视频文件下载
  • 做宣传网站买什么云服务器企业网站优化17
  • 网页制作与网站建设从入门到精通 下载wordpress评论框不见了
  • 个人网站制作程序遵义网站建设有限公司
  • 网站空间代理网站模板设计
  • 免费域名 网站wordpress主题 免
  • 淄博网站排名seo设计网络平台开发
  • 北海市做网站的公司织梦学校网站模板