Just for information, events filtering on the QDesktopWidget doesn't work so much :
In my constructor :
desktop->installEventFilter(this);
desktop->setMouseTracking(true);
desktop = QApplication::desktop();
desktop->installEventFilter(this);
desktop->setMouseTracking(true);
To copy to clipboard, switch view to plain text mode
And in the event :
{
int tmp = -1;
if(target == desktop)
{
tmp = event->type();
switch(tmp)
{
case 109: // Mouse tracking state change
case 74: // Should be Polished
case 75: // Is Polished
break;
default:
tmp = tmp;
break;
}
}
return false;
}
bool MyWidget::eventFilter(QObject *target, QEvent *event)
{
int tmp = -1;
if(target == desktop)
{
tmp = event->type();
switch(tmp)
{
case 109: // Mouse tracking state change
case 74: // Should be Polished
case 75: // Is Polished
break;
default:
tmp = tmp;
break;
}
}
return false;
}
To copy to clipboard, switch view to plain text mode
I've set a breakpoint on the tmp = tmp line in the default case.
I can only seen the third events from the switch / case (perhaps some others, I haven't tried everything but mouse moves and keypress didn't falled in the events filter.
But I've told you that QColor(0, 0, 0, 1) could be visible on a screen, even on an LCD depending of the way you look at it.
It seems that QColor(255, 255, 255, 1) is less visible, I can't see the semi-transparency, it appears really transparent.
The infographic artist told me that a 50% grey QColor(127, 127, 127, 1) is even more neutral.
Hope it could help. If someone has a CRT screen with a crazy contrast rate, just tell me if you see something on a single color desktop background ;o)
Bookmarks