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

网站建设的含义网站里面添加支付怎么做

网站建设的含义,网站里面添加支付怎么做,网站建设协议 合同,苏州专业设计网站概述#xff1a;我们利用QGraphicView和QGraphicScene来实现一个简单的视频播放器#xff0c;然后上面悬浮一些操作的控件#xff0c;看看怎么来实现。 1、CcTestVideoPlayer类 模拟播放器类#xff0c;继承QGraphicScene 1.1 CcTestVideoPlayer.h #pragma once#include…概述我们利用QGraphicView和QGraphicScene来实现一个简单的视频播放器然后上面悬浮一些操作的控件看看怎么来实现。 1、CcTestVideoPlayer类 模拟播放器类继承QGraphicScene 1.1 CcTestVideoPlayer.h #pragma once#include QGraphicsView #include QGraphicsScene #include QVariant #include QSharedPointerclass CcTestVideoPlayer : public QGraphicsView {Q_OBJECTpublic:CcTestVideoPlayer(QWidget *parent nullptr, QGraphicsScene* scene nullptr);~CcTestVideoPlayer(void);protected:void drawBackground(QPainter *painter, const QRectF rect)override;};1.2 CcTestVideoPlayer.cpp #include CcTestVideoPlayer.h#include QLabel #include QStyle #include QPainter #include QPaintEngine #include QGraphicsProxyWidget #include QMenu #include QApplication #include QTimerCcTestVideoPlayer::CcTestVideoPlayer(QWidget *parent, QGraphicsScene* scene): QGraphicsView(parent) {if (scene){scene-setParent(this);}setScene(scene ? scene : new QGraphicsScene(this));auto widget new QWidget;widget-setStyleSheet(background:white;);widget-setFixedSize(QSize(300,420));scene-addWidget(widget)-setZValue(101); }CcTestVideoPlayer::~CcTestVideoPlayer() {}void CcTestVideoPlayer::drawBackground(QPainter *painter, const QRectF rect) {QGraphicsView::drawBackground(painter, this-rect());painter-fillRect(geometry(), QBrush(#0c0b0f)); }2、CcTestVideoSurface  继承QGraphicsScene 2.1 CcTestVideoSurface.h #pragma once#include QGraphicsScene #include QObject #include QLabelclass CcTestVideoSurface : public QGraphicsScene {Q_OBJECTpublic:CcTestVideoSurface(QObject *parent Q_NULLPTR);virtual ~CcTestVideoSurface(void);void showTips();private:QLabel* m_tipsInfoLabel nullptr;QWidget* m_containter nullptr; };2.2  CcTestVideoSurface.cpp #include CcTestVideoSurface.h#include QGraphicsProxyWidget #include QHBoxLayout #include QVBoxLayoutCcTestVideoSurface::CcTestVideoSurface(QObject *parent): QGraphicsScene(parent) {m_containter new QWidget();m_containter-setObjectName(QStringLiteral(tip_container));m_containter-setStyleSheet(#tip_container { background-color: transparent;});m_tipsInfoLabel new QLabel(nullptr);m_tipsInfoLabel-setFixedSize(120, 38);m_tipsInfoLabel-setObjectName(QStringLiteral(tip));m_tipsInfoLabel-setStyleSheet(#tip { background-color: rgba(10,132,254,0.6); border: none; border-radius: 15px; font-size:12px; color:#edf1fa;});m_tipsInfoLabel-setAlignment(Qt::AlignCenter);m_tipsInfoLabel-setText(测试悬浮在view);auto tipLayout new QHBoxLayout;tipLayout-setSpacing(0);tipLayout-setMargin(0);tipLayout-addStretch();tipLayout-addWidget(m_tipsInfoLabel);tipLayout-addStretch();auto layout new QVBoxLayout(m_containter);layout-setSpacing(0);layout-setMargin(0);layout-addStretch();layout-addLayout(tipLayout);layout-addSpacing(4);addWidget(m_containter)-setZValue(102); }CcTestVideoSurface::~CcTestVideoSurface(void) {}void CcTestVideoSurface::showTips() {if (m_containter){m_containter-setVisible(true);} }3、main.cpp #include QApplication #include QWidget #include QDebug//cc-engine里面生成的动态库 #include CcDataManage.h #include CcJsonTool.h#include cc-test/CcTestVideoPlayer.h #include cc-test/CcTestVideoSurface.h//测试graphic viewvoid test_qJson() {//TODO: qt json 简单使用测试auto cmd 1001;auto type 1;auto content 05:00;QVariantMap contentMap;contentMap[cmd] QString::number(cmd);QVariantMap dataMap;dataMap[type] type;dataMap[content] content;contentMap[data] dataMap;CcJsonTool jsonTool;auto str jsonTool.toJsonFromVariantMap(contentMap);qDebug() jsonStr: str;//jsonStrauto JsonStr {\cmd\:\1001\,\data\:{\content\:\05:00\,\type\:1}};if (jsonTool.parseJsonFromString(JsonStr)){qDebug() parse json str success;}else{qDebug() parse json str failed;} }void test_dll_manage() {CcDataManage data_manage;qDebug() Get Data From cc-engine dynamic library: data_manage.GetCurrentJsonData(); }int main(int argc, char *argv[]) {QApplication app(argc, argv);//Qt json 简单测试test_qJson();//一个项目多个子项目并且子项目是动态库调用测试test_dll_manage();//QGraphicView和QGraphicScene简单测试auto videoSurface new CcTestVideoSurface();videoSurface-showTips();auto graphicView new CcTestVideoPlayer(nullptr, new CcTestVideoSurface());graphicView-setFixedSize(QSize(520, 420));graphicView-show();// QWidget window;// window.resize(650, 350);// window.setWindowTitle(简单的cmake构建的Qt窗口程序);// window.show();return app.exec(); }4、最终的结果 5、测试的源码 CcQtApp: Qt测试demo
http://www.pierceye.com/news/687735/

相关文章:

  • 唐四薪php网站开发答案想制作一个网站要多少钱
  • ppt网站建设答案东台网页定制
  • 做网站 侵权如何制作手机版网站
  • 代发网站建设app网站软件
  • 家居企业网站建设如何国家企业信息公示系统全国
  • 网站平台如何推广wordpress登录页面显示ip
  • 如何做网站百度排名优化推广的目的是什么
  • 重庆忠县网站建设公司哪家专业芷江建设局的工作人员网站
  • 戴尔电脑网站建设方案范文室内设计方案图
  • 餐厅网站建设策划方案网站建设存在的具体问题
  • 竞价页面网站做优化广告商对接平台
  • 网站后台如何修改密码wordpress调整页面布局
  • 东莞热点网站建设莱州人才网
  • 线上渠道推广网站的优化哪个好
  • 群晖可以做网站服务器微信朋友圈怎么发链接那种网页怎么制作
  • wordpress 公司网站网站和公众号的区别
  • 数据库跟网站seo流程
  • 网站首页关键词设置网站的整体风格
  • wordpress源码站整站源码制作wordpress插件
  • 海口网站建设就q479185700上墙网站空间后台怎么进入
  • 四川电子有限公司 - 手机网站如何做网站家具导购
  • 网站经营性备案修改wordpress自带小工具
  • 网站怎么建设可以发图评论网站建设制作公
  • 做销售的网站设计公司是做什么的
  • 建设专业网站的利弊海淀区seo招聘信息
  • 吴江区住房与建设局网站网站开发怎么对接客户
  • frontpage2007网站建设网站开发需要redis
  • 国内做网站多少钱ui中有哪些做的好看的网站
  • 金湖建设工程质量监督网站网页设计 网站建设 哪个好
  • 适合做外链的网站梧州论坛红豆思辨