title: How to set Qt tooltip width
body: <p>need to show 2 line text in tooltip with bold and multicolor characters, but seems tooltip has max width and text was cut. I tried to calculate width of text and set width manually, but it doesn't make any effects, seems style = &quot;width: some px&quot; doesn't work for tooltip. Here's the code:</p>
  <p><strong>Edited</strong></p>
  <pre><code>QString tooltip = &quot;&lt;div style= \&quot;white-space: nowrap; width: 1500px;\&quot;&gt;Some text for tooltip, which is too long&lt;/div&gt;&quot;;
  </code></pre>
  <p><img src="https://i.stack.imgur.com/3gYXq.png" alt="there is no effect on tooltip" /></p>
  <p>How can I change tooltip width?</p>