[Interest] Keeping track of a QDialog position
Matthew Woehlke
mwoehlke.floss at gmail.com
Wed Oct 21 16:54:03 CEST 2015
On 2015-10-19 15:36, Rollastre Prostrit wrote:
> I am trying to keep track of the position of a QDialog as the user
> clicks on the title and moves it around the desktop. At most, the only
> thing I manage is to get a move event when the user releases the mouse.
> But I need to keep track of the position to perform some operations
> (somewhat like docking).
Terribly inefficient solution: poll for the window's screen coordinates
(e.g. using a QTimer).
...but this might not work *while* dragging. Or... at all... Ultimately,
you are dependent on the WM to tell you these things, and with WM's
moving increasingly toward compositing-based implementations, that's
like asking a GL texture handle for the coordinates at which it is being
drawn.
--
Matthew
More information about the Interest
mailing list