views:

41

answers:

0

Hello.

I'm trying to make a transparent window stays on top (z-order).

I want to implement something like layer that indicates some parameters on the other program.

So what I need is to make background transparent, not whole widget with QWidget::setWindowOpacity function.

I found some documents about it

  1. http://doc.trolltech.com/qq/qq16-background.html

  2. (http://doc.trolltech.com/4.6/qwidget.html#transparency-and-double-buffering)

the first one explains "New in Qt 4.1: The Backing Store" and the picture is exactly what I want.

and the second one explains more details about it. (left picture)

"The left widget has no additional properties or widget attributes set. This default state suits most custom widgets using transparency, are irregularly-shaped, or do not paint over their entire area with an opaque brush. "

But I don't know how to do it.

would you give me a sample code or an example?

Thank you for reading..

(I'm using Qt 4.6 B.T.W.)