开发者

How set opacity on QGraphicsItem

i have a inherited from QGraphicsScene and QGraphicsItem to create my own classes. I use Qt 4.6.

I want to set a开发者_StackOverflow中文版 specific opacity on each items of my scene. I use setOpacity : setOpacity method, but its not the result i hope. I want to have for example one item opaque and an other transparent (to see the desktop, or the other application).

But if i dont set the opacity of the QGraphicsView to 0.5, i have not the transparancy. And if the QGraphicsView is set to 0.5, the item is not real opaque.

What should i do ?

Thanks you.


setOpacity method is transparent, but only transparent to the background of the graphics scene, not the widget, if you want see the desktop, you need set the widget(dialog, mainwindow etc..)'s opaque.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜