Qt 6.12 LTS is out! See what's new in the release
blog
Paint on widget not in paintEvent and magnifier
-
I see, that "IMPORTANT! QPainter can paint on QWidget only in paintEvent(QPaintEvent*). " (from Wiki qt)
How to draw rectangle or text on click button?
Goal: application magnifier glass, it must- read pixmap from desktop : pixmap = screen->grabWindow(0);
how to read only part of pixmap and often refreshing?
next, I must onMouseMove, read small rectangle near mouse pointer to pixmap, next draw not in paintEvent in my application form N times greater, draw scaled bitmap.
I must capture mouse, it must receive mouse messages, even if mouse is far from application window.
- read pixmap from desktop : pixmap = screen->grabWindow(0);
-
Hi
The tricky part is the drag a rect outside the Qt application.
I used the transparent window solution as talked about here
http://www.ifnamemain.com/posts/2014/Jul/11/screen_capture_1/