<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[html in qtooltip::drawtext()]]></title><description><![CDATA[<p dir="auto">i have this code:</p>
<pre><code>	connect(pBtn, &amp;QPushButton::clicked, [=]
	{
		const static QString sToolTip("Use the following:\n&lt;hr&gt;\n"
			"...");
		QToolTip::showText(pBtn-&gt;mapToGlobal(QPoint(0, 0)), sToolTip, pBtn);
	});
</code></pre>
<p dir="auto">seems like the <code>&lt;hr&gt;</code> isn't recognized, it is just shown as <code>&lt;hr&gt;</code> in tooltip.</p>
]]></description><link>https://forum.qt.io/topic/98904/html-in-qtooltip-drawtext</link><generator>RSS for Node</generator><lastBuildDate>Tue, 24 Nov 2026 23:13:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/98904.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 24 Jan 2019 17:29:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 31 Jan 2019 20:10:17 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/user4592357">@<bdi>user4592357</bdi></a><br />
Recreating tooltip feature is not that trivial.<br />
<a href="https://code.woboq.org/qt5/qtbase/src/widgets/kernel/qtooltip.cpp.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://code.woboq.org/qt5/qtbase/src/widgets/kernel/qtooltip.cpp.html</a><br />
However, one can use event filter to catch if click outside and hide it.</p>
<p dir="auto">Anyway, what is it you want to show in the tooltip ?<br />
Small table or ?</p>
<p dir="auto">ps. does work in tooltip. But this is not really a standard UX thing.<br />
<img src="http://imagizer.imageshack.com/img921/337/4iZheY.png" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/508714</link><guid isPermaLink="true">https://forum.qt.io/post/508714</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 31 Jan 2019 20:10:17 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 31 Jan 2019 20:01:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mrjj">@<bdi>mrjj</bdi></a><br />
i'm on mobile now but will try that html.<br />
another option i'm thinking of is showing a table widget. but i don't know at which position to show it (mouse click) and when and how to hide it?</p>
]]></description><link>https://forum.qt.io/post/508712</link><guid isPermaLink="true">https://forum.qt.io/post/508712</guid><dc:creator><![CDATA[user4592357]]></dc:creator><pubDate>Thu, 31 Jan 2019 20:01:16 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 31 Jan 2019 18:55:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
But your lines are so thin :)</p>
<p dir="auto">My HTML ( drawn in word and just pasted and optimized but still most likely a bit verbose) update. cleaned up a bit.</p>
<pre><code>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;table border="1" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px;" cellspacing="0" cellpadding="0"&gt;&lt;tr&gt;&lt;td width="130"&gt;&lt;p&gt;&lt;span style=" font-size:18pt;"&gt;aaaa&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td width="130"/&gt;&lt;td width="130"/&gt;&lt;td width="130"/&gt;&lt;td width="130"/&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;p&gt;&lt;span style=" font-size:18pt;"&gt;bbbbb&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td/&gt;&lt;td/&gt;&lt;td/&gt;&lt;td/&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;
</code></pre>
]]></description><link>https://forum.qt.io/post/508707</link><guid isPermaLink="true">https://forum.qt.io/post/508707</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 31 Jan 2019 18:55:09 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 31 Jan 2019 18:43:25 GMT]]></title><description><![CDATA[<p dir="auto">would be nice if mine looked like that too.</p>
<p dir="auto">here's my code</p>
<pre><code>		const QString sToolTip(
			"&lt;html&gt;"
			"&lt;body&gt;"
				"&lt;table border=\"1\"&gt;"
					"&lt;caption&gt;Header&lt;caption&gt;"
					"&lt;tr&gt;"
						"&lt;td&gt;...&lt;/tr&gt;"
				"&lt;/table&gt;"
			"&lt;/body&gt;"
			"&lt;/html&gt;"
		);
</code></pre>
<p dir="auto">now the look<br />
<img src="https://i.postimg.cc/MGmVrgwJ/Untitled.png" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/508705</link><guid isPermaLink="true">https://forum.qt.io/post/508705</guid><dc:creator><![CDATA[user4592357]]></dc:creator><pubDate>Thu, 31 Jan 2019 18:43:25 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 31 Jan 2019 18:36:13 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/user4592357">@<bdi>user4592357</bdi></a> said in <a href="/post/508697">html in qtooltip::drawtext()</a>:</p>
<blockquote>
<p dir="auto">border-collapse: collapse</p>
</blockquote>
<p dir="auto">I dont think that tag is supported.</p>
<p dir="auto">Docs says<br />
table	Table	Supports the following attributes: border, bgcolor (Qt color names or #RRGGBB), cellspacing, cellpadding, width (absolute or relative), and height.</p>
<p dir="auto">regarding border width. 1 seems to be the smallest supported and it looks like<br />
<img src="http://imagizer.imageshack.com/img922/5151/aegPTa.png" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/508703</link><guid isPermaLink="true">https://forum.qt.io/post/508703</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 31 Jan 2019 18:36:13 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 31 Jan 2019 17:44:15 GMT]]></title><description><![CDATA[<p dir="auto">what about a table? seems like setting border to it works, but i want the border to be thinner, but <code>border-collapse: collapse;</code> doesn't work</p>
]]></description><link>https://forum.qt.io/post/508697</link><guid isPermaLink="true">https://forum.qt.io/post/508697</guid><dc:creator><![CDATA[user4592357]]></dc:creator><pubDate>Thu, 31 Jan 2019 17:44:15 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 24 Jan 2019 17:58:18 GMT]]></title><description><![CDATA[<p dir="auto">But <code>&lt;hr&gt;</code> is listed as part of <a href="http://doc.qt.io/qt-5/richtext-html-subset.html" target="_blank" rel="noopener noreferrer nofollow ugc">richtext</a> so should work</p>
<p dir="auto">Can you try using other tags like "Use the &lt;b&gt;following&lt;/b&gt;" and see if they work?</p>
]]></description><link>https://forum.qt.io/post/506958</link><guid isPermaLink="true">https://forum.qt.io/post/506958</guid><dc:creator><![CDATA[VRonin]]></dc:creator><pubDate>Thu, 24 Jan 2019 17:58:18 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 24 Jan 2019 17:57:27 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
I think its not considered html for the tooltip label.<br />
try<br />
const static QString sToolTip("&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Use the following:&lt;/p&gt;&lt;hr/&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;"<br />
<img src="https://i.postimg.cc/02NP1R5b/Screenshot-24-01-2019-18-55-51.png" alt="alt text" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/506957</link><guid isPermaLink="true">https://forum.qt.io/post/506957</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 24 Jan 2019 17:57:27 GMT</pubDate></item><item><title><![CDATA[Reply to html in qtooltip::drawtext() on Thu, 24 Jan 2019 17:53:25 GMT]]></title><description><![CDATA[<p dir="auto">According the <a href="http://doc.qt.io/qt-5/qtooltip.html#details" target="_blank" rel="noopener noreferrer nofollow ugc">documentation</a> only richtext is supported.</p>
]]></description><link>https://forum.qt.io/post/506956</link><guid isPermaLink="true">https://forum.qt.io/post/506956</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Thu, 24 Jan 2019 17:53:25 GMT</pubDate></item></channel></rss>