mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 21:33:00 +02:00
Fixed No such signal QmlWindow_QMLTYPE_490::resized(QSizeF) and No such signal QmlWindow_QMLTYPE_490::moved(QVector2D) warnings
This commit is contained in:
parent
367555acdb
commit
aa487faad1
2 changed files with 8 additions and 2 deletions
|
@ -122,12 +122,15 @@ void QmlWindowClass::initQml(QVariantMap properties) {
|
|||
object->setProperty(OFFSCREEN_VISIBILITY_PROPERTY, visible);
|
||||
object->setProperty(SOURCE_PROPERTY, _source);
|
||||
|
||||
const QMetaObject *metaObject = _qmlWindow->metaObject();
|
||||
// Forward messages received from QML on to the script
|
||||
connect(_qmlWindow, SIGNAL(sendToScript(QVariant)), this, SLOT(qmlToScript(const QVariant&)), Qt::QueuedConnection);
|
||||
connect(_qmlWindow, SIGNAL(visibleChanged()), this, SIGNAL(visibleChanged()), Qt::QueuedConnection);
|
||||
|
||||
connect(_qmlWindow, SIGNAL(resized(QSizeF)), this, SIGNAL(resized(QSizeF)), Qt::QueuedConnection);
|
||||
connect(_qmlWindow, SIGNAL(moved(QVector2D)), this, SLOT(hasMoved(QVector2D)), Qt::QueuedConnection);
|
||||
if (metaObject->indexOfSignal("resized") >= 0)
|
||||
connect(_qmlWindow, SIGNAL(resized(QSizeF)), this, SIGNAL(resized(QSizeF)), Qt::QueuedConnection);
|
||||
if (metaObject->indexOfSignal("moved") >= 0)
|
||||
connect(_qmlWindow, SIGNAL(moved(QVector2D)), this, SLOT(hasMoved(QVector2D)), Qt::QueuedConnection);
|
||||
connect(_qmlWindow, SIGNAL(windowClosed()), this, SLOT(hasClosed()), Qt::QueuedConnection);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -18,6 +18,9 @@ Rectangle {
|
|||
width: parent ? parent.width : 100
|
||||
height: parent ? parent.height : 100
|
||||
|
||||
signal moved(vector2d position);
|
||||
signal resized(size size);
|
||||
|
||||
property var channel;
|
||||
|
||||
TextArea {
|
||||
|
|
Loading…
Reference in a new issue