In order to display a tooltip that shows a two-line text with bold and multicolor characters, I encountered an issue where the tooltip had a maximum width constraint and the text was being cut off. I attempted to calculate the width of the text and manually set the width, but it did not have any effect. It appeared that setting the style as "width: some px" did not work for the tooltip. Below is the code snippet:
Edited
QString tooltip = "<div style= \"white-space: nowrap; width: 1500px;\">Some text for tooltip, which is too long</div>";
Is there a way to adjust the width of the tooltip?