I use the function to register hotkey:
Qt Code:
  1. void MyApp::registerGlobalKey(){
  2. if(RegisterHotKey(NULL, 10, 0, VK_F10)){
  3. qDebug("VK_F10.");
  4. std::cout << "VK_F10" << std::endl;
  5. }
  6. if(RegisterHotKey(NULL, 11, 0, VK_F11)){
  7. qDebug("VK_F11.");
  8. std::cout << "VK_F11" << std::endl;
  9. }
  10. }
To copy to clipboard, switch view to plain text mode 
and it works.

also I reimplement winEventFilter:
Qt Code:
  1. bool MyApp::winEventFilter(MSG *msg, long *result){
  2. if(WM_HOTKEY == msg->message){
  3. qDebug("hotkey.");
  4. if(msg->wParam == VK_F10)
  5. qDebug("get F10.");
  6. emit getHotKey();
  7. return true;
  8. }
  9. //qDebug("not hotkey.");
  10. return false;
  11. }
To copy to clipboard, switch view to plain text mode 

but I don't know what to do later to make it able to catch the system/global hot keys.