Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC8.0
   
      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 10-Apr-11 22:16pm
Edited 11-Apr-11 10:19am
v3
Comments
Manfred R. Bihy at 11-Apr-11 7:54am
   
Works fine in XP AND fails in XP. WTF! Not at the same time I hope?
Gokulnath007 at 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 at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 8,149
1 Sergey Alexandrovich Kryukov 7,287
2 DamithSL 5,614
3 Manas Bhardwaj 4,986
4 Maciej Los 4,910


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 11 Apr 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100