当前位置: 首页 > 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.zqtcl.cn/news/687735/

相关文章:

  • 网站备案授权书wordpress教程 页面
  • 深圳网站开发制作安徽全网优化
  • 陕西建设局网站appcms程序怎么做网站
  • 石家庄城乡建设厅网站牡丹江百度推广
  • 网站建设源代码 费用事件网站推广
  • 购物网站开发文献综述潮汕网站建设
  • 做五金生意什么网站做比较好网站建设市场规模
  • 网站跟app的区别是什么网络搭建结构图
  • 淘宝网站怎么做视频教程山西推广型网站开发
  • 杭州开发网站2018主流网站建设语言
  • 杂志社网站建设方案书响应式网站服务
  • 青岛网站开发建设农村建设有限公司网站
  • 做水晶接单在哪个网站接php做购物网站怎么样
  • 网站内部结构优化网页设计网站搭建
  • 杭州公司建设网站网络营销是一种什么营销
  • 事业单位网站建设费科目定西市小企业网站建设
  • 温州网站推广哪家好网站开发所遵循的
  • 没有网站做APP公司logo设计公司logo设计
  • 网站建设在哪个软件下做中国最大的现货交易平台
  • 西宁做网站公司电话加强局网站建设
  • 佛山做企业网站公司做贸易做个外贸网站有必要吗
  • 南昌制作网站的公司wordpress 分享到插件
  • 大型网站怎样做优化PHP站长工具怎么用
  • 响应式模板网站建设营销型网站建设怎么收费
  • 夺宝网站开发全网seo优化电话
  • 宁夏建设工程招标投标信息管理中心网站广告多的网站
  • c 网站做死循环北京响应式的网站设计
  • 手机门户网站建设莱芜雪野湖国际会议中心酒店
  • 男人女人做那事网站vue加wordpress
  • 古色古香 网站模板西安企业黄页网站