QTreeWidget 填充Indictor指示器背景色
来源:互联网 发布:天谕流光女捏脸数据 编辑:程序博客网 时间:2024/06/08 09:17
void TreeWidget::drawRow(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const{QStyleOptionViewItemV3 opt = option;if (index.parent() == QModelIndex()){const QColor c = option.palette.color(QPalette::Dark);painter->fillRect(option.rect, c);opt.palette.setColor(QPalette::AlternateBase, c);}QTreeWidget::drawRow(painter, opt, index);QColor color = static_cast<QRgb>(QApplication::style()->styleHint(QStyle::SH_Table_GridLineColor, &opt));painter->save();painter->setPen(QPen(color));painter->drawLine(opt.rect.x(), opt.rect.bottom(), opt.rect.right(), opt.rect.bottom());painter->restore();}
效果如下:
阅读全文
0 0
- QTreeWidget 填充Indictor指示器背景色
- 随机填充div背景色
- 安卓中动态的填充背景色
- photoshop 图片裁剪与填充前景色及背景色
- Android TextView背景色、圆角、内部填充设置
- DataGridView中按单元格填充内容,字体颜色,背景色
- 取消Chrome表单文本框自动填充黄色背景色样式
- AndroidのTextView背景色、圆角、内部填充设置样式
- qt 4.7组件设置背景色,并填充
- 去掉Chrome自动填充表单浅黄色背景色
- (转)Android TextView背景色、圆角、内部填充设置
- css背景色不填充边框,css的写法?
- Chrome表单文本框自动填充黄色背景色样式
- 自定义控件——万能的圆形指示器Indictor
- 背景色
- 背景色
- 让CStatic控件根据自己的需要改变,文本,文本颜色,填充背景色
- Word2007居然无法去掉doc文档结构图文字突出显示的底纹填充背景色
- 有序链表的插入
- 4-median of two sorted arrays
- SqlServer视图数据的增删改查
- Matlab中fminunc函数的意义 以及options函数的初级用法
- linux配置网卡后无法开机
- QTreeWidget 填充Indictor指示器背景色
- S3C2440之IIC
- rhel6.5 环境nginx安装
- HDU
- shell正则表达式
- 215. Kth Largest Element in an Array(数组中第k大元素)
- JavaScript基本概念(四)
- vue-devtools在Chrom浏览器上的安装
- 优化 Vue 项目编译文件大小