July 22, 2011

Raschko Raschko
Lab Rat
4 posts

[SOLVED ]All focus, all the time



The issue being, I want a transparent tope level window to have total focus until right mouse click.

However with the flag: QtCore.Qt.WA_TranslucentBackground
Focus is lost on mouse down.

The point of the application is to display a transparent QImage over the desktop, with lines drawn by the user.
Sort of an annotation, while working.

I;ve read on grabMouse and Keyboard, but focus is still lost.


HAHA! solved it a minute after posting.
The trick is in the transparency of the objects displayed in the window.
If I set the QImage’s alpha value to 1 (Which you do not notice on screen) windows focus is always kept.

tricky tricky!!!


Shop smart, shop “S"mart!

0 replies

  ‹‹ Pyside: Qwidget expose in QML with qmlRegisterType      PySide/PyQt : loading Chinese language translator file (zh_CN.ts) ? ››

You must log in to post a reply. Not a member yet? Register here!