当前位置:网站首页>QT style syntax definition access, can check the data, can be automatically generated
QT style syntax definition access, can check the data, can be automatically generated
2022-07-23 10:56:00 【Big orange】
background :
Spreadsheets are packaged in the project QTableWidget, Because when the focus is lost in the selected state , The selected cell turns gray , As a result, the background color and text of the selected state cannot be seen clearly . So check the method online .
It can be implemented directly with style like a web page , So he added such a sentence :
setStyleSheet("selection-background-color:lightblue;selection-color:black;");When I first wrote , I only know how to use setStyleSheet Function implementation , But the specific writing method of the style is not only known , Just rely on the previous front-end pair css Understanding , Specifies the background color . The following sentence specifies the font color , It was not written at first , I use it font-color, I don't know , Is tantamount to blind testing .
At the same time, I saw some questions on the Internet , How to get the definition and description of specific style syntax .
Method :
According to my experience , First of all, you should be familiar with the front end css grammar , There is a lot of information on this , Any relatively perfect document is enough . But for reference only . because qt Whether the style in is and css Exactly the same , I have no research on this , I didn't check the relevant information .
Another way is to use qt creator The designer of , It can generate style statements by itself , Make any form , Right click to modify the style , It will automatically generate style statements . For example, take the table as an example , Put one on the form QTableWidget parts , Right click on it :

choice “ Change the style sheet ”.

Choose... As you like , It will generate statements .
They all write programs , As long as you know the grammar , The rest is easy to do , How to express the specific value is easy .
边栏推荐
- Redis源码与设计剖析 -- 9.字符串对象
- 300 questions, Lecture 6, quadratic form
- 疫情时期加中年危机——游荡在十字街口的三个月
- 3DMAX first skin brush weights, then attach merge
- 排序
- China Economic Net: "Yuan universe" is hot
- The topic pub instruction of ros2 appears: failed to populate field: 'vector3' object has no attribute 'x:1' error
- Redis源码与设计剖析 -- 14.数据库实现
- PXE remote installation and kickstart unattended installation technical documents
- Two strategies for building AI products / businesses (by Andrew ng)
猜你喜欢

linux:数据库连接

Redis源码与设计剖析 -- 7.快速列表

Solve the Chinese garbled code of post request and get request in servlet

【Unity】AVPro使用踩坑,编辑器模式使用视频播放正常,打包后视频无法播放的问题

Kubernetes technology and Architecture (VI)

Li Hongyi machine learning 2022-hw1

PXE远程安装和Kickstart无人值守安装 技术文档

Reading the thesis "sentence embeddings using Siamese Bert networks"

对比redis的RDB、AOF模式的优缺点

Redis source code and design analysis -- 6. Compressed list
随机推荐
Comprehensive experiment of realizing private network interworking under mGRE environment
Cadence(九)17.4规则与间距设置
C ivalueconverter interface usage example
【ROS进阶篇】第八讲 URDF文件的语法详解
Redis源码与设计剖析 -- 6.压缩列表
跳转语句与调试程序
部署metersphere
thing JS笔记
组件中的自定义事件
Redis源码与设计剖析 -- 10.列表对象
Mysql的索引为什么用的是B+树?
C language explanation series - understanding of functions (1) library functions, user-defined functions
结构体详解
软件测试基本概念篇
04_ UE4 advanced_ Introduction to physical collision and firing fireballs
Warning lnk4210 reports an error when writing the driver
FPGA - SPI bus control flash (2) (including code)
UNITY VFX syntax error: unexpected token ‘#‘ at kernel CSMain
Redis源码与设计剖析 -- 7.快速列表
Error in na.fail.default(list(Purchase = c(“CH“, “CH“, “CH“, “MM“, “CH“, : missing values in obj