i have a inherited from QGraphicsScene and QGraphicsItem to create my own classes. I use Qt 4.6.
I want to set a 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方法是透明的,但仅对图形场景的背景透明,而不对小部件透明,如果要查看桌面,则需要设置小部件(对话框,主窗口等)的不透明性。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.