One way to have a "hole" in a window is to paint its content using a QPainterPath which has two rectangles: the one for the full size and the hole.
Using a semi transparent color to fill that path will only apply that color to the intersection of the two rectangles.
Something like this
{
path.addRect(rect());
path.addRect(m_holeRect);
painter.fillPath(path, semiTransparentColor);
}
void MyWidget::paintEvent(QPaintEvent *)
{
QPainter painter(this);
QPainterPath path;
path.addRect(rect());
path.addRect(m_holeRect);
painter.fillPath(path, semiTransparentColor);
}
To copy to clipboard, switch view to plain text mode
As for interacting with windows below your window, that is out of scope for the application. You'll need to consult operating system documentation for that whether it is possible at all and if so, how to do that.
Cheers,
_
Bookmarks