How to get screen changed event in Qt widget

1.9k views Asked by At

In my Qt application, I have couple of QtWidgets which are floating. I want to know when QtWidget is dragged to another screen So that I can resize content within according to new screen DPI.

1

There are 1 answers

2
TonyK On

Connect the primaryScreenChanged signal from your QGuiApplication to slots in your widgets.

Edited to add: On reflection, this probably doesn't do what you want -- it signals when the application changes screen, not the widget.