diff --git a/src/plugins/cpptools/cppcodecompletion.cpp b/src/plugins/cpptools/cppcodecompletion.cpp index 4d7bdb697217b7564aa71ce624ddc492b5b8dd79..41373494ec1d904305bbf548cb6580b9fa134d15 100644 --- a/src/plugins/cpptools/cppcodecompletion.cpp +++ b/src/plugins/cpptools/cppcodecompletion.cpp @@ -87,6 +87,14 @@ public: { setFocusPolicy(Qt::NoFocus); setAttribute(Qt::WA_DeleteOnClose); + + // Set the window and button text to the tooltip text color, since this + // widget draws the background as a tooltip. + QPalette p = palette(); + const QColor toolTipTextColor = p.color(QPalette::Inactive, QPalette::ToolTipText); + p.setColor(QPalette::Inactive, QPalette::WindowText, toolTipTextColor); + p.setColor(QPalette::Inactive, QPalette::ButtonText, toolTipTextColor); + setPalette(p); } protected: