透明启动画面图片Qt [英] Transparent Splashscreen Picture Qt

查看:86
本文介绍了透明启动画面图片Qt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的应用程序创建了splash-screen.png.不幸的是,所有应该透明的部分都被绘制为矩形.为了能够更好地理解我的意思,下面是一个简短的示例说明:(我有足够的声誉可以在论坛中放置图片)

I have created a splash-screen.png for my application. Unfortunately all the parts that should be transparent are drawn as a rectangle. To be able to understand better what I mean a small example-description: (I havnt got enough reputation to put a picture into the forum)

让我们说我有一个png作为初始屏幕,其中显示了一个球体.球体应该自成一体,但是Qt在其周围绘制了一个矩形,这破坏了所有的气氛.

Lets say I have a png as splash-screen which shows a sphere. The sphere should stand for itself, but Qt draws a rectangle around it, which destroys all the atmosphere.

如果您知道是否还有另一种可能性可以保持对象周围的透明度,将不胜感激.

Would be very grateful if you know if there is another possibility to maintain the transparency around the object.

谢谢

推荐答案

这似乎是已知的

This seems to be a known bug. As suggested in the bug report a workaround is to use a QLabel instead of a QSplashScreen.

也请查看此论坛帖子.通过对QSplashScreen进行子类化,提出了一种解决方案.

Also check this forum post. A solution is proposed by subclassing QSplashScreen.

这篇关于透明启动画面图片Qt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆