diff --git a/src/declarativeimports/core/ToolTip.qml b/src/declarativeimports/core/ToolTip.qml index 8e5491ffa..f4ee4dc67 100644 --- a/src/declarativeimports/core/ToolTip.qml +++ b/src/declarativeimports/core/ToolTip.qml @@ -40,8 +40,8 @@ import org.kde.plasma.extras 2.0 as PlasmaExtras MouseArea { id: tooltip - property alias mainText: tooltipWindow.mainText // string - property alias subText: tooltipWindow.subText // string + property alias mainText: tooltipMaintext.text // string + property alias subText: tooltipSubtext.text // string property alias iconSource: tooltipIcon.source // icon name property alias image: tooltipImage.source // string / url to the image property Item target: parent @@ -71,13 +71,13 @@ MouseArea { } } - PlasmaCore.ToolTipWindow { + PlasmaCore.ToolTipProxy { id: tooltipWindow visualParent: tooltip.target mainItem: PlasmaCore.FrameSvgItem { id: tooltipSvg - imagePath: "widgets/tooltip" + //imagePath: "widgets/tooltip" width: childrenRect.width + margins.left + margins.right + 2*_s height: childrenRect.height + margins.top + margins.bottom + 2*_s diff --git a/src/declarativeimports/core/tooltip.cpp b/src/declarativeimports/core/tooltip.cpp index f7b3eda24..f34f9d7d9 100644 --- a/src/declarativeimports/core/tooltip.cpp +++ b/src/declarativeimports/core/tooltip.cpp @@ -20,6 +20,7 @@ ***************************************************************************/ #include "tooltip.h" +#include "tooltipdialog.h" #include #include @@ -114,11 +115,19 @@ bool ToolTip::isVisible() const void ToolTip::setVisible(const bool visible) { + ToolTipDialog *dlg = ToolTipDialog::instance(); qDebug() << visible; if (visible) { - //setPosition(popupPosition()); + qDebug() << " showing tooltip: " << ToolTipDialog::instance(); + dlg->setMainItem(mainItem()); + dlg->setVisualParent(m_visualParent.data()); + dlg->setPosition(dlg->popupPosition(visualParent())); + dlg->setVisible(true); + // syncGeometry(); // raise(); + } else { + dlg->setVisible(false); } //QQuickWindow::setVisible(visible); }