So, I think this picture speaks for itself. The tooltip should have black text color and lightgrey background. Ok, if you look closely, the background is lightgrey. But text is white and the most important, the icon for enabled button is shown. This should not be! Other default-buttons, without an icon, the tooltip is displayed correctly. I tried to solve this with opacity(different values) and rgba(211, 211, 211, 0/255), but nothing works. Is this a well-known problem? My System is Windows 10 64 bit and I use Qt Creator 4.12.2 (Community) with Qt 5.12.9 MinGW 64 bit compiler.
#include "mainwindow.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.setStyleSheet("QToolTip { background-color: lightgrey; "
"color: black; "
"border: none } "
"QWidget { color: lightblue; "
"background-color: #404040 }");
w.show();
return a.exec();
}
The stylesheet for that button looks like this:
ui -> CmdSave -> setStyleSheet(" :disabled { color: white; "
"border-image: url(:/miscRsc/misc_icons/filesave_128x128_disabled) 3 10 3 10; "
"border-top: 3px transparent; "
"border-bottom: 3px transparent; "
"border-right: 10px transparent; "
"border-left: 10px transparent } "
":enabled { color: white; "
"border-image: url(:/miscRsc/misc_icons/filesave_128x128) 3 10 3 10; "
"border-top: 3px transparent; "
"border-bottom: 3px transparent; "
"border-right: 10px transparent; "
"border-left: 10px transparent } "
" :pressed { color: white; "
"border-image: url(:/miscRsc/misc_icons/filesave_128x128_pressed.png) 2 9 2 9; border-top: 2px transparent; "
"border-bottom: 2px transparent; "
"border-right: 9px transparent; "
"border-left: 9px transparent }");