mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Merge pull request #5533 from ctrlaltdavid/20637
CR for 20637 - Add WebWindow setPosition() method
This commit is contained in:
commit
cbe38d5fa5
2 changed files with 9 additions and 0 deletions
|
@ -122,6 +122,14 @@ void WebWindowClass::setURL(const QString& url) {
|
|||
_webView->setUrl(url);
|
||||
}
|
||||
|
||||
void WebWindowClass::setPosition(int x, int y) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "setPosition", Qt::AutoConnection, Q_ARG(int, x), Q_ARG(int, y));
|
||||
return;
|
||||
}
|
||||
_windowWidget->move(x, y);
|
||||
}
|
||||
|
||||
void WebWindowClass::raise() {
|
||||
QMetaObject::invokeMethod(_windowWidget, "showNormal", Qt::AutoConnection);
|
||||
QMetaObject::invokeMethod(_windowWidget, "raise", Qt::AutoConnection);
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
|
||||
public slots:
|
||||
void setVisible(bool visible);
|
||||
void setPosition(int x, int y);
|
||||
QString getURL() const { return _webView->url().url(); }
|
||||
void setURL(const QString& url);
|
||||
void raise();
|
||||
|
|
Loading…
Reference in a new issue