Dude that was just an example to show that it (drawing a transparent window in Qt) works...

Just to make clear how that code works: Whenever the timer timeouts update() is called which schedules the window to be redrawn which will eventually call paintEvent(QPaintEvent *event) from QWidget (in Qt every UI object is a widget: windows, buttons, labels, ..., and generally if a widget has not a parent then its a window)

And it works that slow because i set the timeout interval to 250ms, so
1px/0,25sec = 4px/sec => 1080px/270sec = 1080px/4,5min

So just set a smaller timer value if a faster red rect makes you happy!

Also in real esp code you would call the update() inside your hack loop, and not in a timer.
That way the draw code would run as fast/often as your hack loop does and everything would be fine.

I just used a timer because i was lazy and wanted to keep the example as small as possible

Can you get the native window handle of a QWindow? I wouldn't use the QPainter to draw the visuals. It'll probably use GDI/GDI+ which is not the fastest when it comes to cheat overlays. If you can get the native window handle that's not a bad solution and would make for a great platform independent solution except that you'd have to link Qt against your cheat which is probably not small.

Can you get the native window handle of a QWindow? I wouldn't use the QPainter to draw the visuals. It'll probably use GDI/GDI+ which is not the fastest when it comes to cheat overlays. If you can get the native window handle that's not a bad solution and would make for a great platform independent solution except that you'd have to link Qt against your cheat which is probably not small.

Can you get the native window handle of a QWindow? I wouldn't use the QPainter to draw the visuals. It'll probably use GDI/GDI+ which is not the fastest when it comes to cheat overlays. If you can get the native window handle that's not a bad solution and would make for a great platform independent solution except that you'd have to link Qt against your cheat which is probably not small.

You can get it by using qwidget::winId(), then cast to HWND if necessary.

You can use d3d (directly), opengl (QOpenGLWidget), or qt3d (qt3dcore) with an overlay pretty effectively.

I used d3d + qt for my rust cheat way back.

qt's binaries are shared, not static, so you'll need to include them with the cheat, have the user install qt, or rebuild the qt binaries to be static. my overlay was around 10mb with static binaries (prob coulda gotten it smaller if i cared).

tip: if you build static, only build release, the debug static libs are fucking huge and it'll take several hours to build. took around 9 hours last time i did it iirc.

ESP not finished yet, but a few settings from my external hackcontrol UI are now also overlaid!

Quote:

Originally Posted by Requi

Can you get the native window handle of a QWindow? I wouldn't use the QPainter to draw the visuals. It'll probably use GDI/GDI+ which is not the fastest when it comes to cheat overlays. If you can get the native window handle that's not a bad solution and would make for a great platform independent solution except that you'd have to link Qt against your cheat which is probably not small.