| 79 | } |
| 80 | |
| 81 | #ifdef Q_OS_WIN |
| 82 | bool ElaDockWidget::event(QEvent* event) |
| 83 | { |
| 84 | Q_D(ElaDockWidget); |
| 85 | switch (event->type()) |
| 86 | { |
| 87 | case QEvent::Show: |
| 88 | case QEvent::MouseButtonRelease: |
| 89 | { |
| 90 | HWND hwnd = (HWND)d->_currentWinID; |
| 91 | DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE); |
| 92 | ::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME); |
| 93 | ElaWinShadowHelper::getInstance()->setWindowShadow(d->_currentWinID); |
| 94 | #if (QT_VERSION >= QT_VERSION_CHECK(6, 5, 3) && QT_VERSION <= QT_VERSION_CHECK(6, 6, 1)) |
| 95 | bool hasCaption = (style & WS_CAPTION) == WS_CAPTION; |
| 96 | if (!hasCaption) |
| 97 | { |
| 98 | ::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_CAPTION); |
| 99 | } |
| 100 | #endif |
| 101 | break; |
| 102 | } |
| 103 | default: |
| 104 | { |
| 105 | break; |
| 106 | } |
| 107 | } |
| 108 | return QDockWidget::event(event); |
| 109 | } |
| 110 | |
| 111 | #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) |
nothing calls this directly
no test coverage detected