[Qt-interest] Screen coordinates inQGraphicsItem::hoverEnterEvent() ?

Ross Bencina rossb-lists at audiomulch.com
Thu Jun 2 09:14:01 CEST 2011


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?

Perhaps this behavior is dependent on the result of 
QDesktopWidget::isVirtualDesktop()?

I suspect (but am not sure) that you are discussing the case where 
(QDesktopWidget::isVirtualDesktop() == false) -- can you clarify please?

Thanks

Ross. 




More information about the Qt-interest-old mailing list