QtUI设计:设置控件透明
2016-05-27 11:07
441 查看
QT设置按钮控件透明:
代码:
//设置按钮 背景 前景
this->ui->ShowCvRGB->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
// 第一个 为前景色;第二个 为北京色; 透明度 为a
this->ui->ShowPcdFile->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
this->ui->QwtPlotDraw->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(0,0,0,0)"));
this->ui->Train->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
this->ui->Classify->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
this->ui->Abnormal->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
代码:
//设置按钮 背景 前景
this->ui->ShowCvRGB->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
// 第一个 为前景色;第二个 为北京色; 透明度 为a
this->ui->ShowPcdFile->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
this->ui->QwtPlotDraw->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(0,0,0,0)"));
this->ui->Train->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
this->ui->Classify->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
this->ui->Abnormal->setStyleSheet(QString("color:rgba(255,255,255,255);background-color:rgba(100,100,100,100)"));
相关文章推荐
- Java ProcessBuilder 启动 PHP进程 及其读和写的交互
- easyui messager alert 三秒后自动关闭提示
- UIViewController的基本概念与生命周期
- Android SystemUI源码分析(一)
- QT设计UI:QT模式对话框打开文件
- iOS Button 按钮 UIControlStateDisabled 状态的使用
- Android UI性能优化(二)
- LeetCode OJ 62. Unique Paths
- iOS UISearchBar的背景颜色修改
- leetcode---N-Queens II
- 哈希表的静态,动态,以及key/value形式
- 设置UIImage不使用渲染
- leetcode---N-Queens---回溯
- CALayer的那些事(一)
- Keil 汇编编译问题 error C5: 'asm/endasm' requires src-control to be active
- mosquitto install with ssl
- 【性能为王】从PHP源码剖析array_keys和array_unique
- IAR 中 Compile、Make、Build 的区别
- Android中ContentValues用法
- csuoj-1733-XueXX and Chessboard