mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 15:08:05 +02:00
Add WebWindow::setURL
This commit is contained in:
parent
d33d3afb52
commit
46f6c9f888
2 changed files with 9 additions and 0 deletions
|
@ -96,6 +96,14 @@ void WebWindowClass::setVisible(bool visible) {
|
|||
QMetaObject::invokeMethod(_windowWidget, "setVisible", Qt::BlockingQueuedConnection, Q_ARG(bool, visible));
|
||||
}
|
||||
|
||||
void WebWindowClass::setURL(const QString& url) {
|
||||
if (QThread::currentThread() != thread()) {
|
||||
QMetaObject::invokeMethod(this, "setURL", Qt::BlockingQueuedConnection, Q_ARG(QString, url));
|
||||
return;
|
||||
}
|
||||
_webView->setUrl(url);
|
||||
}
|
||||
|
||||
QScriptValue WebWindowClass::constructor(QScriptContext* context, QScriptEngine* engine) {
|
||||
WebWindowClass* retVal;
|
||||
QString file = context->argument(0).toString();
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
|
||||
public slots:
|
||||
void setVisible(bool visible);
|
||||
void setURL(const QString& url);
|
||||
ScriptEventBridge* getEventBridge() const { return _eventBridge; }
|
||||
void addEventBridgeToWindowObject();
|
||||
|
||||
|
|
Loading…
Reference in a new issue