<div class="gmail_quote">On Mon, Jun 4, 2012 at 11:01 AM, Marco Martin <span dir="ltr"><<a href="mailto:notmart@gmail.com" target="_blank">notmart@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Sunday 03 June 2012, Mark wrote:<br>
> Hi,<br>
><br>
> Since "some" people seem to blame me a little for asking question in<br>
> private mails.. I will throw a bunch of questions in the list.<br>
><br>
> For starters, my tooltip "endeavors" are really starting to show now. I got<br>
> the tooltip somewhat working with nice red text in it and a nice red square<br>
> for the icon. That's all in QML and that's working fine.<br>
> The issues i seem to be getting are related to window hints and the dialog<br>
> itself.<br>
<br>
</div>you can take a look at the widget explorer in kde-<br>
workspace/libs/plasmagenericshell/widgetsexplorer/package/contents/ui<br>
<br>
it has a thing that behaves like a tooltip even if with custom content<br></blockquote><div><br></div><div>Will do that. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class="im"><br>
> Just FYI, here is the - very basic and primitive - QML thus far:<br>
> <a href="http://paste.kde.org/492464/" target="_blank">http://paste.kde.org/492464/</a> not complicated at all. And if you're<br>
> wondering.<br>
> The "ToolTipData" is just the PRIVATE class "ToolTip" exposed to QML<br>
> through: rootContext()->setContextProperty("ToolTipData", this); (this =<br>
> class ToolTip)<br>
> ScreenGeometry is: rootContext()->setContextProperty("ScreenGeometry",<br>
> QApplication::desktop()->screenGeometry());<br>
<br>
</div>i wonder if there should also be an option to put a generic Component in it<br>
besides the usual tooltipdata properties, but is probably overkill right now<br></blockquote><div><br></div><div>I was thinking of making a custom component in C++ and exposing that one as a QML component. For example "ToolTipPrivateData" which just holds all the data and emits signals when something is changing. Right now that's not really required but would make it nicer :) Not quite sure yet if i'm going to do that.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
> Here are the issues i have so far:<br>
> 1. The current tooltip classes send a pixmap as an icon (ToolTipManager -><br>
> ToolTipContent -> ToolTip). That's fine, but how do i send the pixmap from<br>
> C++ to QML and actually use it?<br>
<br>
</div>import org.kde.qtextracomponents<br>
<br>
QPixmapItem {<br>
  pixmap: myc++class.pixmap<br>
<div class="im">}<br>
<br></div></blockquote><div>Ahh there it is. I knew there was something. Thank you!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
> 2. Somehow the tooltip itself shows itself just under the middle of the<br>
> screen when i open it up for the first time. If i hover over another item<br>
> for an updated tooltip the position corrects itself. I don't know why this<br>
> is happening. The x position seems to be fine, the y position seems to be<br>
> wrong.<br>
<br>
</div>how are you positioning it? dialog.popupPosition? you should position it<br>
before actually showing it<br></blockquote><div><br></div><div>Ehh, how do i use that one? I can't give a position with that function (it returns a position). </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class="im"><br>
> 3. The tooltip seems to have a minimal width + height of around 100 pixels.<br>
> Where is that minimal limit set and how can i get rid of it?<br>
<br>
</div>shouldn't have any, it should use whatever width/height the main item has<br></blockquote><div><br></div><div>It certainly has something.. I will recheck and come back to you about this one. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class="im"><br>
> 4. Which flags do i need to have for a tooltip? If i put Qt.ToolTip in it i<br>
> get double shadows... Right now i have windowFlags:<br>
> Qt.X11BypassWindowManagerHint in QML (as you can see). No flags are set in<br>
> C++.<br>
<br>
</div>yeah, i think bypasswindowmanagerhints is necessary right now :/<br>
<span class="HOEnZb"><font color="#888888"><br></font></span></blockquote><div>K, will do for now.</div><div><br></div><div>Thank you for the responses. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888">
<br>
<br>
<br>
--<br>
Marco Martin<br>
_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
</font></span></blockquote></div><br>