简体   繁体   English

PyQt4中的初始屏幕窗口不透明度

[英]splash screen window opacity in PyQt4

I am devoloping an application in Python 2.6.4 and PyQt. 我正在开发Python 2.6.4和PyQt中的应用程序。 In that application i am having a window as below 在该应用程序中,我有一个如下窗口

在此处输入图片说明

This window is a splash screen. 此窗口是启动屏幕。 I made the window splash screen because i dont want the window to be shown in the Task bar. 我做了窗口启动画面,因为我不希望窗口显示在任务栏中。 Now i want to set the opacity of the window when the slider moves. 现在我想设置滑块移动时窗口的不透明度。 The percentage of the window opacity will be the value of the slider. 窗口不透明度的百分比将是滑块的值。

在此处输入图片说明

The code which i wrote fro window opacity is 我在窗口不透明度中编写的代码是

sliderValue = self.HSLD_opasity.value()
self.pendingRevCntWindow.setWindowOpacity(sliderValue)

My Problem is that the attribute setWindowOpacity is not working out with splash screen. 我的问题是setWindowOpacity属性无法在初始屏幕上显示。 Please can anyone help me out from this problem. 请谁能帮助我解决这个问题。 Or give another way to solve this. 或给出另一种解决方法。

您必须将滑块的值转换为(0.1-1)范围内的浮点值,因为setWindowOpacity将仅采用(0.1-1)范围内的浮点值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM