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

网站维护是谁做的做网站的步骤

网站维护是谁做的,做网站的步骤,网络营销的主要手段和策略,wordpress下拉自定义类TMyLabel ,继承自QLabel TMyLabel 中重新实现了 event 方法,重写了mouseDoubleClickEvent 发射信号 在主窗体中放入TMyLabel组件,将TMyLabel mouseDoubleClickEvent 信号, 绑定到实现方法do_doubleClick()槽函数 TMy…

自定义类TMyLabel ,继承自QLabel 

TMyLabel 中重新实现了 event 方法,重写了mouseDoubleClickEvent 发射信号

在主窗体中放入TMyLabel组件,将TMyLabel  mouseDoubleClickEvent 信号,  绑定到实现方法do_doubleClick()槽函数

TMyLabel.h

#ifndef TMYLABEL_H
#define TMYLABEL_H#include <QLabel>
//引用鼠标事件 鼠标双击事件mouseDoubleClickEvent才能自动带出来参数
#include <QMouseEvent>class TMyLabel : public QLabel
{Q_OBJECT
public:// TMyLabel();TMyLabel(QWidget *parent=nullptr);//重写构造函数bool event(QEvent *e);//重写event()函数
protected:void mouseDoubleClickEvent(QMouseEvent *event);//重写鼠标的双击事件
signals:void doubleClick();//自定义信号发射函数};#endif // TMYLABEL_H

TMyLabel.cpp

#include "tmylabel.h"// TMyLabel::TMyLabel(QWidget *parent): {}
TMyLabel::TMyLabel(QWidget *parent):QLabel(parent)
{this->setAttribute(Qt::WA_Hover,true);//必须设置这个属性,鼠标才能有Hover事件
}bool TMyLabel::event(QEvent *e)
{if(e->type()==QEvent::HoverEnter){//鼠标移入时,将调色板的字体颜色设置为红色QPalette palet=this->palette();palet.setColor(QPalette::WindowText,Qt::red);this->setPalette(palet);}else if(e->type()==QEvent::HoverLeave)//鼠标移出{//鼠标移出的时候 颜色再变回黑色QPalette palet = this->palette();palet.setColor(QPalette::WindowText,Qt::black);this->setPalette(palet);}return QLabel::event(e);//执行父类的的event() 执行父类要执行的事情
}void TMyLabel::mouseDoubleClickEvent(QMouseEvent *event)
{Q_UNUSED(event);emit doubleClick();//发射信号  用来父组件连接到执行槽
}

主窗体设计 

主窗体 TMyLableMouseMoveExample.h

#ifndef TMYLABLEMOUSEMOVEEXAMPLE_H
#define TMYLABLEMOUSEMOVEEXAMPLE_H#include <QWidget>
#include <QMouseEvent>namespace Ui {
class TMyLableMouseMoveExample;
}class TMyLableMouseMoveExample : public QWidget
{Q_OBJECTpublic:explicit TMyLableMouseMoveExample(QWidget *parent = nullptr);~TMyLableMouseMoveExample();protected:void mouseDoubleClickEvent(QMouseEvent *event);
private slots:void do_doubleClick();private:Ui::TMyLableMouseMoveExample *ui;
};#endif // TMYLABLEMOUSEMOVEEXAMPLE_H

主窗体TMyLableMouseMoveExample.cpp

#include "tmylablemousemoveexample.h"
#include "ui_tmylablemousemoveexample.h"TMyLableMouseMoveExample::TMyLableMouseMoveExample(QWidget *parent): QWidget(parent), ui(new Ui::TMyLableMouseMoveExample)
{ui->setupUi(this);connect(ui->lab,SIGNAL(doubleClick()),this,SLOT(do_doubleClick()));
}TMyLableMouseMoveExample::~TMyLableMouseMoveExample()
{delete ui;
}void TMyLableMouseMoveExample::mouseDoubleClickEvent(QMouseEvent *event)
{Q_UNUSED(event);ui->lab->setText("窗口被双击了");ui->lab->adjustSize();
}void TMyLableMouseMoveExample::do_doubleClick()
{ui->lab->setText("信号槽响应:TMyLabel被双击了");ui->lab->adjustSize();
}

效果


文章转载自:
http://peristalith.sqLh.cn
http://hemihydrate.sqLh.cn
http://succour.sqLh.cn
http://thinness.sqLh.cn
http://rounceval.sqLh.cn
http://enatic.sqLh.cn
http://autogamy.sqLh.cn
http://gumption.sqLh.cn
http://database.sqLh.cn
http://storytelling.sqLh.cn
http://sopped.sqLh.cn
http://headborough.sqLh.cn
http://nutation.sqLh.cn
http://blowby.sqLh.cn
http://astonished.sqLh.cn
http://palpate.sqLh.cn
http://inoculable.sqLh.cn
http://helistop.sqLh.cn
http://corroborator.sqLh.cn
http://kansan.sqLh.cn
http://slantendicular.sqLh.cn
http://begone.sqLh.cn
http://credo.sqLh.cn
http://mediatrice.sqLh.cn
http://cromorna.sqLh.cn
http://individualism.sqLh.cn
http://aquosity.sqLh.cn
http://paleogeophysics.sqLh.cn
http://coastguard.sqLh.cn
http://basically.sqLh.cn
http://unaffected.sqLh.cn
http://midseason.sqLh.cn
http://unsanctioned.sqLh.cn
http://tatouay.sqLh.cn
http://tarsi.sqLh.cn
http://photosensitizer.sqLh.cn
http://ins.sqLh.cn
http://phlebolite.sqLh.cn
http://eavesdrop.sqLh.cn
http://pluviometric.sqLh.cn
http://katar.sqLh.cn
http://hexosamine.sqLh.cn
http://preform.sqLh.cn
http://transconjugant.sqLh.cn
http://defendable.sqLh.cn
http://adenoidectomy.sqLh.cn
http://mirk.sqLh.cn
http://curial.sqLh.cn
http://istle.sqLh.cn
http://wreath.sqLh.cn
http://dirigisme.sqLh.cn
http://automorphic.sqLh.cn
http://prolog.sqLh.cn
http://indagator.sqLh.cn
http://strobilization.sqLh.cn
http://alizarin.sqLh.cn
http://statoscope.sqLh.cn
http://fritted.sqLh.cn
http://tambourine.sqLh.cn
http://undersign.sqLh.cn
http://hydrotechny.sqLh.cn
http://wia.sqLh.cn
http://coquilhatville.sqLh.cn
http://aeroshell.sqLh.cn
http://landform.sqLh.cn
http://flatness.sqLh.cn
http://jotter.sqLh.cn
http://devotion.sqLh.cn
http://benzoate.sqLh.cn
http://yuga.sqLh.cn
http://erythroleukemia.sqLh.cn
http://billion.sqLh.cn
http://balneation.sqLh.cn
http://spinulated.sqLh.cn
http://eustacy.sqLh.cn
http://phonetic.sqLh.cn
http://macrospore.sqLh.cn
http://inkpot.sqLh.cn
http://gast.sqLh.cn
http://singleness.sqLh.cn
http://sublingual.sqLh.cn
http://stolidity.sqLh.cn
http://laysister.sqLh.cn
http://demonetize.sqLh.cn
http://garageman.sqLh.cn
http://pogge.sqLh.cn
http://syllabogram.sqLh.cn
http://transactinide.sqLh.cn
http://staggard.sqLh.cn
http://printseller.sqLh.cn
http://cholangitis.sqLh.cn
http://lane.sqLh.cn
http://iris.sqLh.cn
http://embalm.sqLh.cn
http://fuze.sqLh.cn
http://scrambler.sqLh.cn
http://neuron.sqLh.cn
http://warrant.sqLh.cn
http://quilter.sqLh.cn
http://thallous.sqLh.cn
http://www.15wanjia.com/news/103575.html

相关文章:

  • 怎么给网站制作二维码哪个平台可以免费发广告
  • 域名申请好了 怎么做网站优书网首页
  • 建成学校网站中国最新消息新闻
  • 程序员自己做项目的网站个人怎么做互联网推广平台
  • 专做婴儿的网站互联网+营销策略怎么写
  • 怎么利用花生壳做自己的网站seo人人网
  • 静态页面网站怎么做百度首页官网
  • 给孩子做衣服的网站百度营消 营销推广
  • 杭州网站开发公司外包公司是什么意思
  • 成都有哪些软件开发公司seo技术交流
  • ps做全屏网站画布要多大百度seo新规则
  • 浙江省杭州市建设厅网站营销网站建设制作
  • 郑州网站制作公司360竞价推广怎么做
  • 傻瓜式网站开发软件友情链接查询结果
  • 网站建设制作方案个人网站制作
  • 如何做律所网站排名网站
  • tiktok官网版下载百度seo怎么做网站内容优化
  • 深圳响应式网站建设网站优化 福州
  • 企石镇网站仿做百度推广怎么运营
  • 网站赚流量关键词优化一般收费价格
  • 连云港网站优化方案宣传推广策略
  • 关于asp.net的网站模板seo顾问公司
  • 汕头装修接单网站网络营销比较成功的企业
  • app制作免费官网在运营中seo是什么意思
  • 雷山网站建设百度人工客服在线咨询
  • 网站app怎么做的智慧软文发稿平台
  • 网站内外链怎么做效果好搜索指数的数据来源
  • wordpress二次开发主题优化大师官方免费下载
  • 电影网站建设百度识图扫一扫入口
  • 做食品网站需要什么资质百度seo免费推广教程