Open bhowiebkr opened 1 year ago
This appears to be an issue with QT or windows 11 itself. With the code below the red background in the stylesheet doesn't change.
from PySide6.QtWidgets import QApplication, QWidget, QToolTip, QPushButton
app = QApplication([])
# Set stylesheet to customize tooltip colors
app.setStyleSheet("QToolTip { background-color: red; color: blue; }")
# Create a widget with a button that has a tooltip
widget = QWidget()
button = QPushButton("button", widget)
button.setToolTip("This is a custom tooltip")
widget.show()
app.exec()
To get around this for now, I'm setting the text in the tool tip white so the tips are visible
qdarktheme.setup_theme(additional_qss="QToolTip {color: black;}")
Just ran into this issue and accidentally discovered a fix. To get the theme to work properly on Windows 11, add an additional qss that removes the border:
qdarktheme.setup_theme(additional_qss="QToolTip { border: 0px; }")
For whatever reason, this works and allows QT to render the tool boxes correctly
This is a note for the future me:
additional_qss="QToolTip {color: white; background-color: black; border: 0px; }"
I'm finding that tooltips are showing up incorrectly. Text color appears to be correct but the background is white making it impossible to see. See attached image
This is in Windows 11 and PySide6