python - pyqt,tablewidget,单元格内容变化,使其单元格背景颜色变化一小段时间,有没有啥思路?
黄舟
黄舟 2017-04-18 10:16:33
0
1
532

最近写了个界面,接收server端推过来的数据,不断的实时更新显示。现在产品提出了这么个要求,就是表格里不是每个数据都在变化的,要求内容变化的单元格能够使其背景颜色变化一小段时间,这样user就可以更直观的看到哪里在变化。就是类似于炒股软件,很多只股票,只要有字段一变化,会高亮一下,然后恢复正常颜色。
我查了一下,pyqt好像没有相应的解决方法,不知道各位有何思路,而且pyqt的界面刷新机制,是等到函数走完才会去刷新一次界面,如果想在函数里sleep的话,是无效的,它会等sleep完才刷新,才变化颜色。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
迷茫

I have never encountered this situation, but you can try to use qss to achieve it. However, there is relatively little information on QSS. You can look for information on CSS. Searching for the keyword "css delay color change" will yield results. The main reason is the transition attribute, which has a delay effect.
Give me two examples to see if it is useful
http://www.w3school.com.cn/cs...
http://www.111cn. net/cssp/c...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!