If you use Kvanutm to style your Qt6 apps, there’s a chance your tooltips look like this:

Buggy tooltips with black text over a black background.

If not, skip this post.

But if yes, you’ve probably also tried to look this up on the web, only to be surprised by the fact that there are only three major mentions of this issue, with ineffective and seemingly ignorant replies from Kvantum’s developer.

I tried debugging it, but after investing two days and not getting any meaningful leads, I gave up. Here’s everything relevant I got:

  • tooltip.text.color is applied to Qt5 apps but not Qt6 apps.
  • Qt6 apps’ tooltips are always rendered with black text.
  • tooltip.base.color is applied neither to Qt5 nor Qt6 apps.
  • This is a Kvantum issue: no other styles (Fusion, Windows, etc.) are affected, but all Kvantum themes (built-in and third-party) are.
  • The relevant code in Kvantum (mainly polishing[5].cpp) is same for both Qt5 and Qt6.

This last point makes it extra peculiar. Not sure how one can be affected but not the other. Maybe mine is an edge case, maybe I’ve misconfigured something I can’t pinpoint, especially considering that the developer confirmed that they couldn’t reproduce it.

Either way, here’s a workaround building upon the post on Arch forum:

  • A note first:
    • For user-local themes, you can either change the original files or duplicate the theme with another name and make the changes there.
    • For built-in/system themes, you can create a user-local override using instructions under “Configure Active Theme” in Kvantum Manager. You’ll get a <theme-name>#.kvconfig that overrides the original kvconfig. Even though Kvantum doesn’t mention it, you can also create a <theme-name>#.svg alongside it to override the original SVG.
  • .kvconfig changes:
    • Set tooltip.text.color to something dark, like black.
    • (Optional but recommended) Under the [ToolTip] section, delete/comment out all frame.* properties and add frame=false.
  • .svg changes:
    • In the path with the ID tooltip-normal (search for id="tooltip-normal" in the file), overwrite the fill in it’s style to something light, for example fill:#fdffe7 for a bright yellow.
    • (Optional but recommended) In some themes, you may find a fill-opacity in the style with a value other than “1”. If you want, change it to fill-opacity:1 to make tooltips opaque.

Making these changes will have your tooltips looking like this:

Workaround tooltips with black text over a signature bright yellow background.

If you feel the tooltips are unreadable on light backgrounds, skip the frame-related .kvconfig changes. This will keep a displeasing but functional black frame around them.

Here’s an explanation of what changed:

  • Remember, the problem is that Qt6 apps always have dark tooltip text, which seemingly cannot be changed.
  • To fix this, the background needs to be made light. This should’ve been possible using tooltip.base.color but that’s not working, hence the SVG fill changes.
  • With a light background, the default light tooltip.text.color, applied to Qt5 apps, makes their tooltips hard to read, so it’s changed to something dark, like black, for parity with Qt6 apps.
  • With these changes, both Qt5 and Qt6 apps’ tooltips have dark texts and light backgrounds.
  • There are optional changes to remove the frame around tooltips, and make them opaque, which in my opinion makes them look at a lot better. If you prefer otherwise, omit these changes.