mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:03:58 +02:00
only send fake event to the OGLWidget
This commit is contained in:
parent
503de083f8
commit
a4fcff6b19
1 changed files with 4 additions and 8 deletions
|
@ -721,15 +721,11 @@ void Menu::aboutApp() {
|
|||
|
||||
void sendFakeEnterEvent() {
|
||||
QPoint lastCursorPosition = QCursor::pos();
|
||||
QGLWidget* glWidget = Application::getInstance()->getGLWidget();
|
||||
|
||||
QWindowList windows = QGuiApplication::topLevelWindows();
|
||||
foreach(QWindow* window, windows) {
|
||||
if (window->isActive()) {
|
||||
QPoint windowPosition = window->mapFromGlobal(lastCursorPosition);
|
||||
QEnterEvent enterEvent = QEnterEvent(windowPosition, windowPosition, lastCursorPosition);
|
||||
QCoreApplication::sendEvent(window, &enterEvent);
|
||||
}
|
||||
}
|
||||
QPoint windowPosition = glWidget->mapFromGlobal(lastCursorPosition);
|
||||
QEnterEvent enterEvent = QEnterEvent(windowPosition, windowPosition, lastCursorPosition);
|
||||
QCoreApplication::sendEvent(glWidget, &enterEvent);
|
||||
}
|
||||
|
||||
const int QLINE_MINIMUM_WIDTH = 400;
|
||||
|
|
Loading…
Reference in a new issue