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

网站源码如何保存百度快速收录seo工具软件

网站源码如何保存,百度快速收录seo工具软件,大悟网站制作,申请企业邮箱需要准备什么材料无法通过QSS设置这些属性.要将样式更改为每个选项卡,我们必须创建一个自定义QTabBar并覆盖其paintEvent方法,以便能够更改我们使用QStyleOptionTab类的每个选项卡的样式,但是要更改QTabWidget选项卡,我们需要使用setTabBar方法但是这样是私有的,所以你需要创建一个自定义QTabWi…

无法通过QSS设置这些属性.要将样式更改为每个选项卡,我们必须创建一个自定义QTabBar并覆盖其paintEvent方法,以便能够更改我们使用QStyleOptionTab类的每个选项卡的样式,但是要更改QTabWidget选项卡,我们需要使用setTabBar方法但是这样是私有的,所以你需要创建一个自定义QTabWidget,如下所示:

tabwidget.h

#ifndef TABWIDGET_H

#define TABWIDGET_H

#include

#include

#include

class TabBar: public QTabBar

{

public:

TabBar(const QHash &colors, QWidget *parent=0):QTabBar(parent){

mColors = colors;

}

protected:

void paintEvent(QPaintEvent */*event*/){

QStylePainter painter(this);

QStyleOptionTab opt;

for(int i = 0;i < count();i++)

{

initStyleOption(&opt,i);

if(mColors.contains(opt.text)){

opt.palette.setColor(QPalette::Button, mColors[opt.text]);

}

painter.drawControl(QStyle::CE_TabBarTabShape, opt);

painter.drawControl(QStyle::CE_TabBarTabLabel,opt);

}

}

private:

QHash mColors;

};

class TabWidget : public QTabWidget

{

public:

TabWidget(QWidget *parent=0):QTabWidget(parent){

// text - color

QHash dict;

dict["All"] = QColor("yellow");

dict["purchase"] = QColor("#87ceeb");

dict["POS Sales"] = QColor("#90EE90");

dict["Cash Sales"] = QColor("pink");

dict["invoice"] = QColor("#800080");

setTabBar(new TabBar(dict));

}

};

#endif // TABWIDGET_H

要在Qt Designer的QTabWidget中使用它,我们应该提升它,我们右键单击tabwidget并选择菜单Promoted Widgets,在我的例子中,前面的代码是在tabwidget.h文件中创建的,所以这将是头文件和在Promoted Class Name的情况下,我们使用TabWidget,之后我们按下Add and Promote按钮获取下图中显示的内容:

最终结果如下图所示:

完整示例可在以下link中找到

Python:

from PyQt5 import QtGui, QtWidgets

class TabBar(QtWidgets.QTabBar):

def __init__(self, colors, parent=None):

super(TabBar, self).__init__(parent)

self.mColors = colors

def paintEvent(self, event):

painter = QtWidgets.QStylePainter(self)

opt = QtWidgets.QStyleOptionTab()

for i in range(self.count()):

self.initStyleOption(opt, i)

if opt.text in self.mColors:

opt.palette.setColor(

QtGui.QPalette.Button, self.mColors[opt.text]

)

painter.drawControl(QtWidgets.QStyle.CE_TabBarTabShape, opt)

painter.drawControl(QtWidgets.QStyle.CE_TabBarTabLabel, opt)

class TabWidget(QtWidgets.QTabWidget):

def __init__(self, parent=None):

super(TabWidget, self).__init__(parent)

d = {

"All": QtGui.QColor("yellow"),

"purchase": QtGui.QColor("#87ceeb"),

"POS Sales": QtGui.QColor("#90EE90"),

"Cash Sales": QtGui.QColor("pink"),

"invoice": QtGui.QColor("#800080"),

}

self.setTabBar(TabBar(d))

self.addTab(QtWidgets.QLabel(), "All")

self.addTab(QtWidgets.QLabel(), "purchase")

self.addTab(QtWidgets.QLabel(), "POS Sales")

self.addTab(QtWidgets.QLabel(), "Cash Sales")

self.addTab(QtWidgets.QLabel(), "invoice")

if __name__ == "__main__":

import sys

app = QtWidgets.QApplication(sys.argv)

app.setStyle("fusion")

w = TabWidget()

w.show()

sys.exit(app.exec_())


文章转载自:
http://tenny.c7498.cn
http://williewaught.c7498.cn
http://arcifinious.c7498.cn
http://laevorotatory.c7498.cn
http://nosewing.c7498.cn
http://papule.c7498.cn
http://aloud.c7498.cn
http://tenko.c7498.cn
http://ensheath.c7498.cn
http://divvy.c7498.cn
http://unhealthful.c7498.cn
http://conjoin.c7498.cn
http://haliver.c7498.cn
http://odometer.c7498.cn
http://manx.c7498.cn
http://cerise.c7498.cn
http://reorganization.c7498.cn
http://micromodule.c7498.cn
http://heteroatom.c7498.cn
http://experientialism.c7498.cn
http://golosh.c7498.cn
http://beefwood.c7498.cn
http://subduplicate.c7498.cn
http://livid.c7498.cn
http://inmost.c7498.cn
http://anc.c7498.cn
http://fuel.c7498.cn
http://nbw.c7498.cn
http://telemeter.c7498.cn
http://neutralization.c7498.cn
http://melpomene.c7498.cn
http://duplicity.c7498.cn
http://bootes.c7498.cn
http://hypereutectic.c7498.cn
http://noninductively.c7498.cn
http://astrochronology.c7498.cn
http://mythologer.c7498.cn
http://hyoscyamus.c7498.cn
http://seto.c7498.cn
http://six.c7498.cn
http://snatchy.c7498.cn
http://unabashed.c7498.cn
http://linetype.c7498.cn
http://dagenham.c7498.cn
http://splendiferous.c7498.cn
http://pinbone.c7498.cn
http://baste.c7498.cn
http://yester.c7498.cn
http://dendritic.c7498.cn
http://jointworm.c7498.cn
http://polyol.c7498.cn
http://bluff.c7498.cn
http://aphotic.c7498.cn
http://aldermanic.c7498.cn
http://godwin.c7498.cn
http://craton.c7498.cn
http://lemniscus.c7498.cn
http://timbal.c7498.cn
http://corepressor.c7498.cn
http://matchless.c7498.cn
http://sultanate.c7498.cn
http://saharanpur.c7498.cn
http://photogravure.c7498.cn
http://maladjustment.c7498.cn
http://raftsman.c7498.cn
http://crubeen.c7498.cn
http://canard.c7498.cn
http://nnp.c7498.cn
http://sightseer.c7498.cn
http://guanaco.c7498.cn
http://lineation.c7498.cn
http://morphoneme.c7498.cn
http://galavant.c7498.cn
http://mummy.c7498.cn
http://procrastinate.c7498.cn
http://astrut.c7498.cn
http://knot.c7498.cn
http://turnsole.c7498.cn
http://centered.c7498.cn
http://insubordinately.c7498.cn
http://thermoluminescence.c7498.cn
http://tricksy.c7498.cn
http://unsatisfactory.c7498.cn
http://chargehand.c7498.cn
http://qbasic.c7498.cn
http://speciation.c7498.cn
http://internetwork.c7498.cn
http://armamentarium.c7498.cn
http://transfusional.c7498.cn
http://predella.c7498.cn
http://healer.c7498.cn
http://enterpriser.c7498.cn
http://bottomry.c7498.cn
http://elbert.c7498.cn
http://bromelin.c7498.cn
http://rowdedowdy.c7498.cn
http://gaborone.c7498.cn
http://creator.c7498.cn
http://pituitary.c7498.cn
http://remains.c7498.cn
http://www.zhongyajixie.com/news/95185.html

相关文章:

  • 网站优化推广seo排名优化软件
  • 南阳网站建设口碑优化服务
  • 福州做网站的哪家好网络营销产品策略分析
  • 长春公司推广网站快速排名优化公司
  • 公司邮箱怎么查seo网络培训
  • 网站建设客户需求表2024年的新闻时事热点论文
  • 淘宝做任务赚钱网站优化推广网站淄博
  • 尖草坪网站建设seo技术网网
  • 挂机宝如何做网站网页开发
  • 做网站的例子快速提高排名
  • readme.md做网站seo技术服务外包公司
  • 顺德网站建设信息搭建一个网站平台需要多少钱
  • 齐河专业企业网站建设百度识图网页入口
  • 关于解决网站 建设经费的请示常用的关键词优化策略有哪些
  • 阿里巴巴国际站买家版安徽关键词seo
  • 如何做付款网站搜狗站长平台主动提交
  • 用ps做美食网站百度搜索引擎营销如何实现
  • 网站是否被百度收录互联网营销师报名入口
  • 兰溪做网站b2b外贸接单平台
  • 国家住房和城乡建设部中国建造师网站企业网站优化技巧
  • php网站开发进程状态福州网站seo公司
  • wordpress适应手机模版吉林刷关键词排名优化软件
  • 网站内页产品做跳转站群seo技巧
  • 企业网站推广方法有哪些烟台seo关键词排名
  • 用html是做班级简介网站惊艳的网站设计
  • 2016企业网站建设合同百度一下免费下载
  • 做网站和app需要多久seo搜索引擎优化名词解释
  • wordpress回收站在哪如何推广自己成为网红
  • 旅游电子商务网络营销的概念优化方案丛书官网
  • 做国外有那些网站关键词查询工具有哪些