Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
if ((event->type()==QEvent::KeyPress) && (event->modifiers() &&
     Qt::ControlModifier) &&
     (event->modifiers() && Qt::AltModifier) && (event->key()==Qt::Key_L))
{
    QMessageBox::warning(NULL,"keypress","key pressed",QMessageBox::Ok);
}


This code works fine in xp but fails in xp Win7.. Please help me
Posted
Updated 11-Apr-11 9:19am
v3
Comments
Manfred Rudolf Bihy 11-Apr-11 7:54am    
Works fine in XP AND fails in XP. WTF! Not at the same time I hope?
Gokulnath007 11-Apr-11 8:04am    
same code working fine in xp.. not working in windows 7.. nothing is returned when the key combination's are pressed
Emilio Garavaglia 11-Apr-11 15:20pm    
Pay attention on what "paste as HTML" do when pasting code... I hope I interpreted well the mess in the question.
Please, check if my edit is what you wanted.

There are no "language issues" in your code. You just call a number of Qt API. May be the version of Qt you are using is not fully compatible with W7.
 
Share this answer
 
v2
By fail, I assume you mean the if-block is never entered. You should break there in the debugger and see which of the sub-conditions do not return true on Windows 7. It may be a QT issue with W7, it may be a bug in your code, it may be that you need an updated QT version, could be anything really.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900