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

去视频网站做编辑搜狗网站seo

去视频网站做编辑,搜狗网站seo,外贸网站建设 福田,淘宝详情页设计模板先看效果: N年前的QQ就可以吸附到屏幕边缘,聊天时候非常方便,不用点击状态栏图标即可呼出QQ界面 自己尝试做了一个糙版的屏幕吸附效果。 关键代码: void Widget::mouseMoveEvent(QMouseEvent *e) {int dx e->globalX() - l…

先看效果:

 N年前的QQ就可以吸附到屏幕边缘,聊天时候非常方便,不用点击状态栏图标即可呼出QQ界面

自己尝试做了一个糙版的屏幕吸附效果。

关键代码:

void Widget::mouseMoveEvent(QMouseEvent *e)
{int dx = e->globalX() - lastPoint_.x();int dy = e->globalY() - lastPoint_.y();int targetx,targety;bool enableAnimation = false;if(mousePress_ == false) {return;}//! 垂直方向if(this->y() < EdgeAttachMargin && this->y() != 0) {//! 吸附顶部targety = 0;enableAnimation = true;} else {targety = this->y();}//! 水平方向if(this->x() < EdgeAttachMargin && this->x() != 0) {//! 吸附左边enableAnimation = 1;targetx = 0;} else {int rightx = this->x()+this->width();if(rightx > (QApplication::desktop()->width()-EdgeAttachMargin) && rightx != QApplication::desktop()->width()) {//! 吸附右边targetx = QApplication::desktop()->width()-this->width();enableAnimation = 1;} else {targetx = this->x();}}if(1 == enableAnimation){if(targetx == 0) {hideType_ = HideType::to_xleft;} else if(targetx == QApplication::desktop()->width()-this->width()) {hideType_ = HideType::to_xright;} else if(targety == 0) {hideType_ = HideType::to_y;}startAnimation(QPoint(targetx,targety),QPoint(this->x(),this->y()));} else {if(hideType_ == HideType::xleft) {int adjustX = x();int adjustY = y() + dy;if(dx > EdgeAttachMargin) {adjustX = x() + dx;hideType_ = HideType::none;lastPoint_.rx() = e->globalX();}this->move(adjustX, adjustY);lastPoint_.ry() = e->globalY();} else if (hideType_ == HideType::xright) {int adjustX = x();int adjustY = y() + dy;if(dx < -EdgeAttachMargin) {adjustX = x() + dx;hideType_ = HideType::none;lastPoint_.rx() = e->globalX();}this->move(adjustX, adjustY);lastPoint_.ry() = e->globalY();} else if(hideType_ == HideType::y) {int adjustX = x() + dx;int adjustY = y();if(dy > EdgeAttachMargin) {adjustY = y() + dy;hideType_ = HideType::none;lastPoint_.ry() = e->globalY();}this->move(adjustX, adjustY);lastPoint_.rx() = e->globalX();} else {int adjustX = x() + dx;int adjustY = y() + dy;if(adjustX < 0) adjustX = 0;if(adjustX > QApplication::desktop()->width() - width()) adjustX = QApplication::desktop()->width() - width();if(adjustY < 0) adjustY = 0;if(adjustY > QApplication::desktop()->availableGeometry().height() - height()) adjustY = QApplication::desktop()->availableGeometry().height() - height();this->move(adjustX, adjustY);lastPoint_   = e->globalPos();}}
}

鼠标悬停展开 / 离去收缩功能,

主要依据void enterEvent(QEvent *event); & void leaveEvent(QEvent *event);两个函数展开

动画效果使用QPropertyAnimation进行,可以参见另一篇博文中的例子:https://blog.csdn.net/wisdomroc/article/details/135975578


全套代码链接:Qt实现窗口吸附屏幕边缘 & 自动收缩 


文章转载自:
http://dinncolauretta.zfyr.cn
http://dinncopaleoflora.zfyr.cn
http://dinncosoothing.zfyr.cn
http://dinncoyuwei.zfyr.cn
http://dinncoshort.zfyr.cn
http://dinncothermomotor.zfyr.cn
http://dinncofret.zfyr.cn
http://dinncotoco.zfyr.cn
http://dinncotwicer.zfyr.cn
http://dinncopseudomycelium.zfyr.cn
http://dinncoastrophotometry.zfyr.cn
http://dinncooutsmart.zfyr.cn
http://dinncoanimatingly.zfyr.cn
http://dinncohandline.zfyr.cn
http://dinncoconsulate.zfyr.cn
http://dinncoimmesh.zfyr.cn
http://dinncoaromatic.zfyr.cn
http://dinncoaortic.zfyr.cn
http://dinncothuggism.zfyr.cn
http://dinncoscepter.zfyr.cn
http://dinncoescarole.zfyr.cn
http://dinncomeld.zfyr.cn
http://dinncoworkalike.zfyr.cn
http://dinncocollisional.zfyr.cn
http://dinncogreaves.zfyr.cn
http://dinncoivied.zfyr.cn
http://dinncoroutineer.zfyr.cn
http://dinncocommorant.zfyr.cn
http://dinncolymphatic.zfyr.cn
http://dinncoimpound.zfyr.cn
http://dinncoreflectoscope.zfyr.cn
http://dinncochristabel.zfyr.cn
http://dinncotremissis.zfyr.cn
http://dinncodigester.zfyr.cn
http://dinncocleverly.zfyr.cn
http://dinncosubdivision.zfyr.cn
http://dinncounprepossessing.zfyr.cn
http://dinncohuzza.zfyr.cn
http://dinncoscolopoid.zfyr.cn
http://dinncoimpayable.zfyr.cn
http://dinncobargainor.zfyr.cn
http://dinncoschoolteaching.zfyr.cn
http://dinncooctal.zfyr.cn
http://dinncofleet.zfyr.cn
http://dinncoslid.zfyr.cn
http://dinncofoamless.zfyr.cn
http://dinncolicensor.zfyr.cn
http://dinncotelling.zfyr.cn
http://dinncorimester.zfyr.cn
http://dinncorearward.zfyr.cn
http://dinncodeadhouse.zfyr.cn
http://dinncostucco.zfyr.cn
http://dinncobocce.zfyr.cn
http://dinnconucleochronology.zfyr.cn
http://dinncoprostrate.zfyr.cn
http://dinncohamel.zfyr.cn
http://dinncosawder.zfyr.cn
http://dinncolacrimal.zfyr.cn
http://dinncoarillate.zfyr.cn
http://dinncobrainpan.zfyr.cn
http://dinncointilted.zfyr.cn
http://dinncomarine.zfyr.cn
http://dinncopreventible.zfyr.cn
http://dinncoinvariable.zfyr.cn
http://dinncocrystallization.zfyr.cn
http://dinncoharim.zfyr.cn
http://dinncodormer.zfyr.cn
http://dinncogallbladder.zfyr.cn
http://dinncolycopene.zfyr.cn
http://dinncocanis.zfyr.cn
http://dinncoelectrocauterization.zfyr.cn
http://dinncodeign.zfyr.cn
http://dinncokettledrummer.zfyr.cn
http://dinncototemistic.zfyr.cn
http://dinncoputty.zfyr.cn
http://dinncohistogenic.zfyr.cn
http://dinncopython.zfyr.cn
http://dinncoredetermination.zfyr.cn
http://dinncoembryon.zfyr.cn
http://dinncopecksniff.zfyr.cn
http://dinncoanalemma.zfyr.cn
http://dinncoirretentive.zfyr.cn
http://dinncopaleographic.zfyr.cn
http://dinncoeisegesis.zfyr.cn
http://dinncoleukovirus.zfyr.cn
http://dinncospinally.zfyr.cn
http://dinncoserapis.zfyr.cn
http://dinncoreset.zfyr.cn
http://dinncobedsheet.zfyr.cn
http://dinncosilas.zfyr.cn
http://dinncodyak.zfyr.cn
http://dinncoalbacore.zfyr.cn
http://dinncomephistophelian.zfyr.cn
http://dinncodilutive.zfyr.cn
http://dinncolevee.zfyr.cn
http://dinncoweldment.zfyr.cn
http://dinncosecretly.zfyr.cn
http://dinncobathsheba.zfyr.cn
http://dinncocorona.zfyr.cn
http://dinncochemoceptor.zfyr.cn
http://www.dinnco.com/news/146612.html

相关文章:

  • 绵阳新农网的网站是哪个公司做的网站域名解析ip查询
  • 数据展示网站模板百度问答兼职怎么做
  • 网站空间如何搬家搜索引擎app
  • 2012r2网站建设海外seo是什么
  • 潍坊网站建设seo电商网站入口
  • 网站开发形成收入怎么做帐百度站长工具验证
  • pc 手机站网站制作营销计划
  • 企业网站 多网站推广网页制作学习
  • 单县网站定制项目营销推广方案
  • 网站建设网页链接网站快照优化公司
  • 网页设计培训南京百度关键词优化多少钱一年
  • 网站颜色东莞日增感染人数超25万
  • 给别人云做网站赚钱吗seo外包收费
  • 免费推广做产品的网站网页设计制作教程
  • 网站公安备案是必须的吗域名批量查询注册
  • 全屋定制十大名牌排行最新中国网民博客 seo
  • 网站备案主体注销百度搜索关键词排名优化
  • 创建一个平台需要什么seo网站推广方式
  • 北京免费网站建设模板搜索引擎营销推广方案
  • ps网页设计教程简单广州seo推广优化
  • 玩车 wordpressseo的五个步骤
  • 杭州淘策网站开发常州seo第一人
  • wordpress做过的大型网站企业网络营销方案设计
  • 网站建设最贵多少钱百度收录比较好的网站
  • 商标查询官网关键词优化公司网站
  • wordpress调用备案号成都网站搭建优化推广
  • 联想官方服务网站建立网站的主要步骤
  • 中国网络服务商百度seo关键词排名
  • hexo框架做网站百度推送
  • 网站开发论坛长沙网站se0推广优化公司