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

电商网站怎么做权限控制百度seo服务

电商网站怎么做权限控制,百度seo服务,页面看不到网站,淘宝店网站建设规划书一、概述 QGraphicsGridLayout是Qt框架中用于在QGraphicsScene中布置图形项的一个布局管理器。它类似于QWidget中的QGridLayout,但主要处理的是QGraphicsItem和QGraphicsWidget等图形项。通过合理设置网格位置、伸缩因子和尺寸,可以实现复杂而灵活的布局…

一、概述

QGraphicsGridLayout是Qt框架中用于在QGraphicsScene中布置图形项的一个布局管理器。它类似于QWidget中的QGridLayout,但主要处理的是QGraphicsItem和QGraphicsWidget等图形项。通过合理设置网格位置、伸缩因子和尺寸,可以实现复杂而灵活的布局管理。它允许开发者在指定的行和列中放置图形项,并通过激活布局来自动计算每个图形项的位置和大小。

二、QGraphicsGridLayout类介绍

1、构造函数

  • QGraphicsGridLayout(): 默认构造函数,创建一个空的网格布局。

2、主要方法

  • void addItem(QGraphicsLayoutItem *item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = Qt::Alignment()):将指定的图形项添加到指定的行和列,并可以选择跨越多行或多列以及指定对齐方式。
  • void addItem(QGraphicsLayoutItem *item, int row, int column, Qt::Alignment alignment = Qt::Alignment()):将指定的图形项添加到指定的行和列,并可以指定对齐方式。
  • QGraphicsLayoutItem *itemAt(int row, int column) const:返回指定位置的图形项。
  • void removeItem(QGraphicsLayoutItem *item):移除指定的 图形项。
  • void setColumnMinimumWidth(int column, qreal width):指定列的最小宽度。
  • void setRowMinimumHeight(int row, qreal height):指定行的最小高度。
  • void setColumnStretchFactor(int column, int stretch):指定列的拉伸因子。
  • void setRowStretchFactor(int row, int stretch):指定行的拉伸因子。
  • void setVerticalSpacing(qreal spacing):设置行与行之间的垂直间距。
  • void setHorizontalSpacing(qreal spacing):设置行与行之间的水平间距。
  • int rowCount() const:返回行的数量。
  • int columnCount() const:返回列的数量。

QGraphicsView *view = new QGraphicsView;
QGraphicsScene *scene = new QGraphicsScene;
QGraphicsWidget *container = new QGraphicsWidget;
QGraphicsGridLayout *gridLayout = new QGraphicsGridLayout;scene->setSceneRect(0, 0, 500, 500);
view->setScene(scene);// 创建一些按钮并添加到网格布局中
QPushButton *button1 = new QPushButton("Button 1");
QPushButton *button2 = new QPushButton("Button 2");
QPushButton *button3 = new QPushButton("Button 3");
QPushButton *button4 = new QPushButton("Button 4");// 使用 QGraphicsProxyWidget 将按钮添加到场景中
QGraphicsProxyWidget *proxy1 = scene->addWidget(button1);
QGraphicsProxyWidget *proxy2 = scene->addWidget(button2);
QGraphicsProxyWidget *proxy3 = scene->addWidget(button3);
QGraphicsProxyWidget *proxy4 = scene->addWidget(button4);// 将按钮添加到网格布局中
gridLayout->addItem(proxy1, 0, 0);
gridLayout->addItem(proxy2, 0, 1);
gridLayout->addItem(proxy3, 1, 0);
gridLayout->addItem(proxy4, 1, 1);// 设置网格布局的行和列伸缩因子
gridLayout->setRowStretchFactor(0, 1);
gridLayout->setRowStretchFactor(1, 1);
gridLayout->setColumnStretchFactor(0, 1);
gridLayout->setColumnStretchFactor(1, 1);// 将网格布局设置为容器的布局
container->setLayout(gridLayout);// 将容器添加到场景
scene->addItem(container);
view->show();

觉得有帮助的话,打赏一下呗。。

           

http://www.mmbaike.com/news/54556.html

相关文章:

  • 大学生网站模板北京网讯百度科技有限公司
  • wordpress建站案例课程培训
  • 公司网站制作企业最近发生的热点新闻
  • 怎样在一个虚拟服务器里做两个网站百度推广需要多少钱
  • 做个公司网站需要什么钱杭州互联网公司排名榜
  • 翻墙到国外网站怎么做深圳百度推广开户
  • 自己制作logo免费生成器北京搜索关键词优化
  • 制作公司网站要多少费用呢百度指数是啥
  • 做网站在哪里网站的营销推广
  • 怎么查看网站访问速度外包公司的人好跳槽吗
  • 模板网官网免费seo推广专员
  • 简历旅游网站开发经验app推广方案怎么写
  • 苍南做网站哪里找营销推广是什么
  • 石家庄网站制作费用手机优化大师官网
  • 医药类网站建设评价公司宣传软文
  • 重庆网站建设的意义seo优化培训班
  • 深圳做网站三网合一网站优化哪个公司好
  • 大学生做家教靠谱网站2020年百度搜索排名
  • 信用网站建设方案搜索引擎优化简称
  • 广西贵港建设集团有限公司网站网络营销推广主要做什么?
  • 张家港网站制作公司百度云网盘资源搜索
  • 辽宁省兴城做网站的百度seo关键词优化排名
  • 网站建设和维护pdf北京优化网站推广
  • 中山做网站哪家便宜色盲测试图片
  • 做图剪片文案网站app接单湖南网站网络推广哪家奿
  • 池州网站建设怎么样杭州最专业的seo公司
  • 牡丹江网站建设兼职南昌seo网站推广
  • 合肥网站设计建设南京关键词网站排名
  • 高端大气网站seo优化排名怎么做
  • wordpress管理地址在哪里设置厦门seo代理商