Re: [Interest] How to be notified when widget is moved to another screen?

2016-10-21 Thread Elvis Stansvik
Thanks a lot for these snippets Adam, indeed a bit more work than I thought. This is embarrassing, but since my first post I've realized I have no need for being notified after all. Anyway, it's good to see how it can be done, and might help someone else. My use case was that I had a vtkRenderWi

Re: [Interest] How to be notified when widget is moved to another screen?

2016-10-21 Thread Adam Light
On Fri, Oct 21, 2016 at 12:47 AM, Elvis Stansvik wrote: > 2016-10-21 9:22 GMT+02:00 Elvis Stansvik : > > Using > > > > QApplication::desktop()->screenNumber(widget); > > > > it's possible to get the screen number of the screen where the widget > > is mostly visible. > > > > But how can I be n

Re: [Interest] How to be notified when widget is moved to another screen?

2016-10-21 Thread Elvis Stansvik
2016-10-21 9:22 GMT+02:00 Elvis Stansvik : > Using > > QApplication::desktop()->screenNumber(widget); > > it's possible to get the screen number of the screen where the widget > is mostly visible. > > But how can I be notified when this changes for a particular widget? > > Must I monitor the wi

[Interest] How to be notified when widget is moved to another screen?

2016-10-21 Thread Elvis Stansvik
Using QApplication::desktop()->screenNumber(widget); it's possible to get the screen number of the screen where the widget is mostly visible. But how can I be notified when this changes for a particular widget? Must I monitor the widget's moveEvent/resizeEvent/... myself, and check if the s