Compile-time connection for dialog sizing

This commit is contained in:
Sebastian Kügler 2013-12-17 03:54:37 +01:00
parent e352eb9157
commit 5ff0605529

View File

@ -93,10 +93,10 @@ void DialogProxy::setMainItem(QQuickItem *mainItem)
mainItem->setProperty("parent", QVariant::fromValue(contentItem()));
if (mainItem->metaObject()->indexOfSignal("widthChanged")) {
connect(mainItem, SIGNAL(widthChanged()), m_syncTimer, SLOT(start()));
connect(mainItem, &QQuickItem::widthChanged, [=](){m_syncTimer->start();});
}
if (mainItem->metaObject()->indexOfSignal("heightChanged")) {
connect(mainItem, SIGNAL(heightChanged()), m_syncTimer, SLOT(start()));
connect(mainItem, &QQuickItem::heightChanged, [=](){m_syncTimer->start();});
}
syncToMainItemSize();
}