[Qt-interest] Screen coordinates inQGraphicsItem::hoverEnterEvent() ?
Andreas Pakulat
apaku at gmx.de
Thu Jun 2 09:32:41 CEST 2011
On 02.06.11 17:14:01, Ross Bencina wrote:
> Hello Bertrand
>
> You wrote:
> > Unfortunately, I feel, but hopefully will be proven wrong, that your
> > suggestion will not work in a multi-screen environment, and that is a
> > requirement for my app.
> >
> > In such an environment, the same global screen pos can refer to
> > different screens, hence different widgets, and again I have no way
> > that I am aware of, to differentiate between those screens.
>
> This has not been my experience (on Windows and Mac OS) perhaps I am
> mistaken, however my understanding is that:
>
> "screenPos()" always refers to a position in a single, unified, global
> coordinate system that spans all screens.
>
> That is to say, all QDesktopWidget::screenGeometry(x) rects are part of a
> continuous plane.
>
> Perhaps this is not the case on X11?
No, thats the case on X11 as well. But there's one other setup on X11,
one can have a separate X11 screen on each monitor, i.e. its not a
single plane but multiple individual ones and each one has its complete
own Desktop Environment running on it. I'm not sure right now what
constraints that setup has, i.e. wether X11 allows windows to be moved
from one to another or wether a window in one screen can access the
screen in another. So in that scenario you'd have multiple (0,0)
positions, but I don't think this kind of setup is very common these
days on X11 since it requires quite some effort to set it up and most of
the DE's don't fully support this (they just happen to work in it for
the most part).
Andreas
More information about the Qt-interest-old
mailing list