Repositioning a label with mouseevents to anywhere on the screen

Posted by user2947295 on Stack Overflow See other posts from Stack Overflow or by user2947295
Published on 2013-11-02T09:50:10Z Indexed on 2013/11/02 9:53 UTC
Read the original article Hit count: 151

Filed under:
|
|

I've created a label and used setPixmap to attach a .png image to the label. I've also setWindowFlags to disable the title bar and create a frameless window. Because I've disabled those, it also disables the ability to drag anything around, so I want to create mouseevents (unless there's a better method) to position my label anywhere on the screen exactly like dragging the frame of a window. How would I do that? An example and brief explanation would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about c++

Related posts about qt