If anyone needs the same effect on X11, here is the code:

Qt Code:
  1. #include <QX11Info>
  2. #include <X11/Xlib.h>
  3. #include <X11/extensions/shape.h>
  4.  
  5. MyWidget::MyWidget() : QWidget()
  6. {
  7. QRegion region;
  8. XShapeCombineRegion( QX11Info::display(), winId(), ShapeInput, 0, 0, region.handle(), ShapeSet );
  9. }
To copy to clipboard, switch view to plain text mode 
You need link X11 extensions library. You may add this to your .pro file:
LIBS += -lXext

Note that window's decoration will still be clickable, so you will probably have to get rid of it.