Showing the changes to interface/src/scripting/WebWindowClass.cpp (1 of 2 files). Show all
Unified · Split
| @@ -122,6 +122,14 @@ void WebWindowClass::setURL(const QString& url) { · 121 unmodified lines | ||
| 122 | 122 | _webView->setUrl(url); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | +void WebWindowClass::setPosition(int x, int y) { | |
| 126 | + if (QThread::currentThread() != thread()) { | |
| 127 | + QMetaObject::invokeMethod(this, "setPosition", Qt::AutoConnection, Q_ARG(int, x), Q_ARG(int, y)); | |
| 128 | + return; | |
| 129 | + } | |
| 130 | + _windowWidget->move(x, y); | |
| 131 | +} | |
| 132 | + | |
| 125 | 133 | void WebWindowClass::raise() { |
| 126 | 134 | QMetaObject::invokeMethod(_windowWidget, "showNormal", Qt::AutoConnection); |
| 127 | 135 | QMetaObject::invokeMethod(_windowWidget, "raise", Qt::AutoConnection); |