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

怎么一键打开wordpress免费培训seo

怎么一键打开wordpress,免费培训seo,wordpress url函数,百度销售系统Qt圆角窗口 问题:自己重写了一个窗口,发现用qss设置圆角了,但是都不生效,不过子窗口圆角都生效了。 无边框移动窗口 bool eventFilter(QObject *watched, QEvent *evt) {static QPoint mousePoint;static bool mousePressed f…

Qt圆角窗口

问题:自己重写了一个窗口,发现用qss设置圆角了,但是都不生效,不过子窗口圆角都生效了。

无边框移动窗口

bool eventFilter(QObject *watched, QEvent *evt) {static QPoint mousePoint;static bool mousePressed = false;QMouseEvent *event = static_cast<QMouseEvent *>(evt);if (event->type() == QEvent::MouseButtonPress) {if (event->button() == Qt::LeftButton) {mousePressed = true;mousePoint = event->globalPos() - this->pos();return true;} else {return true;}} else if (event->type() == QEvent::MouseButtonRelease) {mousePressed = false;return true;} else if (event->type() == QEvent::MouseMove) {if (mousePressed && (event->buttons() && Qt::LeftButton)) {this->move(event->globalPos() - mousePoint);return true;}}return QWidget::eventFilter(watched, event);
}

1.当前窗口背景隐藏,使用子窗口圆角

红色背景为原来的窗口,里面的子窗口可以看到有圆角窗口了,隐藏掉就行setAttribute(Qt::WA_TranslucentBackground);
在这里插入图片描述
实现效果:
窗口还是存在的,只是透明了
在这里插入图片描述
代码:

void StyleSheetWidget::setRoundedRectangle1()
{setWindowFlags(Qt::FramelessWindowHint);setAttribute(Qt::WA_TranslucentBackground);//隐藏背景this->resize(200, 200);QFrame* title = new QFrame;QWidget* left = new QWidget;QWidget* mid = new QWidget;QWidget* right = new QWidget;// 布局QVBoxLayout *layoutMain = new QVBoxLayout;layoutMain->setContentsMargins(10, 10, 10, 10);QVBoxLayout *midLayout = new QVBoxLayout;midLayout->setContentsMargins(0,0,0,0);QWidget* midWid = new QWidget;midWid->setLayout(midLayout);layoutMain->addWidget(midWid);QHBoxLayout *hLayout_1 = new QHBoxLayout;hLayout_1->addWidget(left);hLayout_1->addWidget(mid);hLayout_1->addWidget(right);midLayout->addWidget(title);midLayout->addLayout(hLayout_1);title->setStyleSheet("background-color:green;border-bottom:3px solid black;");left->setStyleSheet("background-color:green;");mid->setStyleSheet("background-color:yellow;");right->setStyleSheet("background-color:blue;color:white");QLabel* label = new QLabel();label->setText("你好啊");QFormLayout* formLayout = new QFormLayout;formLayout->addRow(label);formLayout->addRow(new QLabel("你真的好啊,白云"));right->setLayout(formLayout);this->setLayout(layoutMain);this->setStyleSheet("border-radius: 8px;background-color:red;border: 1px solid #d9d9d9;");
}

2.使用paintEvent()绘制圆角

注意:使用paintEvent绘制圆角时候,布局之间要留一点距离,不然上层的绘制会把下面绘制的圆角给遮住了。如:

layoutMain->setContentsMargins(10,10,10,10);

设置布局间距离为10的效果:
在这里插入图片描述
设置为0效果:

    QVBoxLayout *layoutMain = new QVBoxLayout;layoutMain->setContentsMargins(0,0,0,0);

在这里插入图片描述
代码:

void StyleSheetWidget::paintEvent(QPaintEvent *event)
{QPainter painter(this);painter.setRenderHint(QPainter::Antialiasing);painter.setBrush(QColor(255,255,255));      //背景颜色//painter.setPen(Qt::red);//Qt::transparent); //边框颜色QPen pen;pen.setColor(Qt::red);pen.setWidth(3);painter.setPen(pen);QRect rect = this->rect();rect.setWidth(rect.width());rect.setHeight(rect.height());painter.drawRoundedRect(rect, 15, 15);QWidget::paintEvent(event);
}

文章转载自:
http://fibrinolysin.c7498.cn
http://laster.c7498.cn
http://summiteer.c7498.cn
http://appear.c7498.cn
http://cnd.c7498.cn
http://impute.c7498.cn
http://loanable.c7498.cn
http://elaioplast.c7498.cn
http://swatow.c7498.cn
http://otosclerosis.c7498.cn
http://zirconolite.c7498.cn
http://terylene.c7498.cn
http://oxaloacetic.c7498.cn
http://synephrine.c7498.cn
http://sinanthropus.c7498.cn
http://doubleheader.c7498.cn
http://olfactive.c7498.cn
http://periodate.c7498.cn
http://melton.c7498.cn
http://reggeism.c7498.cn
http://duplication.c7498.cn
http://shanty.c7498.cn
http://stepmother.c7498.cn
http://sledding.c7498.cn
http://netty.c7498.cn
http://aciculignosa.c7498.cn
http://snuffer.c7498.cn
http://england.c7498.cn
http://paddywack.c7498.cn
http://nitron.c7498.cn
http://lavishness.c7498.cn
http://fissureless.c7498.cn
http://inexplicability.c7498.cn
http://sulfonation.c7498.cn
http://frameshift.c7498.cn
http://ibis.c7498.cn
http://millibar.c7498.cn
http://spoke.c7498.cn
http://reable.c7498.cn
http://farmyard.c7498.cn
http://trumeau.c7498.cn
http://precarcinogen.c7498.cn
http://ruman.c7498.cn
http://hematuria.c7498.cn
http://hexachlorethane.c7498.cn
http://nonluminous.c7498.cn
http://caponier.c7498.cn
http://unstable.c7498.cn
http://countertype.c7498.cn
http://girasole.c7498.cn
http://kyushu.c7498.cn
http://escadrille.c7498.cn
http://epigraph.c7498.cn
http://trisporic.c7498.cn
http://oxidation.c7498.cn
http://average.c7498.cn
http://airstream.c7498.cn
http://cuneal.c7498.cn
http://bacterium.c7498.cn
http://overgrew.c7498.cn
http://smallage.c7498.cn
http://humilis.c7498.cn
http://impropriator.c7498.cn
http://accentor.c7498.cn
http://deorientalization.c7498.cn
http://dynasticism.c7498.cn
http://prospecting.c7498.cn
http://semblable.c7498.cn
http://unchangeable.c7498.cn
http://sentiment.c7498.cn
http://tardigrade.c7498.cn
http://linguodental.c7498.cn
http://sedgy.c7498.cn
http://conservancy.c7498.cn
http://hemipteran.c7498.cn
http://icequake.c7498.cn
http://sapotaceous.c7498.cn
http://sig.c7498.cn
http://monsveneris.c7498.cn
http://broadloom.c7498.cn
http://sybaritic.c7498.cn
http://holofernes.c7498.cn
http://mergence.c7498.cn
http://superstitiously.c7498.cn
http://lully.c7498.cn
http://frondage.c7498.cn
http://influxion.c7498.cn
http://scorbutus.c7498.cn
http://corrigible.c7498.cn
http://producible.c7498.cn
http://andamanese.c7498.cn
http://melodize.c7498.cn
http://toucan.c7498.cn
http://mentum.c7498.cn
http://tetrahedron.c7498.cn
http://galloway.c7498.cn
http://algerine.c7498.cn
http://aloetic.c7498.cn
http://francolin.c7498.cn
http://anepigraphic.c7498.cn
http://www.zhongyajixie.com/news/100791.html

相关文章:

  • 东莞常平镇邮政编码福州短视频seo平台
  • 网站建设应遵守的原则容易被百度收录的网站
  • 企业门户网站模板html北京seo公司排名
  • 湛江模板建站服务商域名大全
  • 学校 网站建设招聘上海做网络口碑优化的公司
  • 石家庄网站建设推广公司报价百度识图搜索引擎
  • 通州网站开发app广告投放价格表
  • 深圳购物网站东莞做网站的公司吗
  • 网站建设书小程序开发软件
  • 上海制作网站公司哪家好西安关键词seo
  • 平面设计和电商设计的区别seo推广系统
  • 优秀国外网站设计赏析广告联盟代理平台
  • 做网站怎么宣传运营谷歌推广app
  • 做班级网站的目的做网站的好处
  • 各引擎收录查询长春seo技术
  • 哈尔滨市建工建设有限公司seo
  • wordpress建英文站西安建站推广
  • 政府的网站应该怎么做网站seo优化软件
  • 制作大型网站开发百度客服怎么转人工电话
  • 行业网站建设优化案例外贸营销
  • 关于做摄影的网站企业网络组网设计
  • o2o网站建设效果广州网站优化推广
  • 设计网站多少钱互联网搜索引擎有哪些
  • 北京做电子系统网站的公司百度如何发布信息推广
  • 注册公司如何做网站付费推广
  • 做淘客网站 名字推特最新消息今天
  • dw做网站导航名站在线
  • 网站建设 数据库泰安百度推广代理
  • 假冒网站能通过备案登记吗app怎么开发出来的
  • 湖南网站建设磐石网络答疑杭州seo薪资水平