check for scene sxistence
This commit is contained in:
parent
e4eeac663d
commit
42ddc80867
@ -92,12 +92,12 @@ void ToolTipProxy::syncTarget()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_declarativeItemContainer) {
|
if (!m_declarativeItemContainer && scene) {
|
||||||
m_declarativeItemContainer = QWeakPointer<DeclarativeItemContainer>(new DeclarativeItemContainer());
|
m_declarativeItemContainer = QWeakPointer<DeclarativeItemContainer>(new DeclarativeItemContainer());
|
||||||
m_declarativeItemContainer.data()->setObjectName("DIContainer");
|
m_declarativeItemContainer.data()->setObjectName("DIContainer");
|
||||||
scene->addItem(m_declarativeItemContainer.data());
|
scene->addItem(m_declarativeItemContainer.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_declarativeItemContainer) {
|
if (m_declarativeItemContainer) {
|
||||||
m_target.data()->setObjectName("Original Item");
|
m_target.data()->setObjectName("Original Item");
|
||||||
m_declarativeItemContainer.data()->setDeclarativeItem(item, false);
|
m_declarativeItemContainer.data()->setDeclarativeItem(item, false);
|
||||||
@ -105,7 +105,7 @@ void ToolTipProxy::syncTarget()
|
|||||||
m_declarativeItemContainer.data()->setParentItem(m_target.data());
|
m_declarativeItemContainer.data()->setParentItem(m_target.data());
|
||||||
m_widget = m_declarativeItemContainer.data();
|
m_widget = m_declarativeItemContainer.data();
|
||||||
emit targetChanged();
|
emit targetChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ToolTipProxy::mainText() const
|
QString ToolTipProxy::mainText() const
|
||||||
|
Loading…
Reference in New Issue
Block a user