| 250 | } |
| 251 | |
| 252 | void MainFrame::OnParentNaitveWindowEvent(int msg) |
| 253 | { |
| 254 | |
| 255 | #ifdef _WIN32 |
| 256 | if (_parentNativeWidget != NULL |
| 257 | && msg == PARENT_EVENT_DISPLAY_CHANGED){ |
| 258 | |
| 259 | qApp->processEvents(); //wait the screen dpi ready. |
| 260 | |
| 261 | QTimer::singleShot(100, this, [this](){ |
| 262 | auto screen = _parentNativeWidget->GetPointScreen(); |
| 263 | if (screen == NULL){ |
| 264 | dsv_info("ERROR: MainFrame::OnParentNaitveWindowEvent, failed to get pointing screen."); |
| 265 | screen = QGuiApplication::primaryScreen(); |
| 266 | } |
| 267 | |
| 268 | PopupDlgList::TryCloseAllByScreenChanged(screen); |
| 269 | PopupDlgList::SetCurrentScreen(screen); |
| 270 | |
| 271 | _parentNativeWidget->UpdateChildDpi(); |
| 272 | _parentNativeWidget->ResizeChild(); |
| 273 | _parentNativeWidget->ReShowWindow(); |
| 274 | }); |
| 275 | } |
| 276 | #endif |
| 277 | } |
| 278 | |
| 279 | void MainFrame::resizeEvent(QResizeEvent *event) |
| 280 | { |
nothing calls this directly
no test coverage detected