Make attached PC3 tooltip follow the correct style

Due to the way attached tooltips are implemented in Qt we currently always get the QtQuick.Controls version instead of the PC3 version when using the attached tooltip.

This happens because Qt internally creates an instance of QtQuick.Controls.ToolTip and stores that in a property of the engine to reuse.

If we create an instance of the correct tooltip before and store it in that property we can make it use the right object.

This is obviously a huge hack and needs to be done for every engine that loads Plasma stuff, but we have a similar per-engine-property hack already with the _kirigamiTheme thing

Relevant Qt code: https://codebrowser.dev/qt6/qtdeclarative/src/quicktemplates/qquicktooltip.cpp.html#361

Edited by Nicolas Fella

Merge request reports

Loading