开发者

How to draw rectangle using Qt to Xlib window

开发者 https://www.devze.com 2023-02-22 16:25 出处:网络
Let say that i have id of another Xlib window and i want to draw over this window rectangle. Is there way to to draw it using Qt? I found on solution but it doesn\'t work for me:

Let say that i have id of another Xlib window and i want to draw over this window rectangle. Is there way to to draw it using Qt? I found on solution but it doesn't work for me:

QPixmap pix = QPixmap::fromX11Pixmap(wId, QPixmap::ExplicitlyShared);
pix.fill(QColor::fromRgb(255,255,255));

I expect it'll fill window with white开发者_如何学JAVA color, but it doesn't.


You could embed this window, place an invisible window on top and render into this invisible window. The effect would be the same : a rectangle over the window.

0

精彩评论

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