Trap click event on dock icon using Qt on Mac

后端 未结 3 2013
暖寄归人
暖寄归人 2021-01-24 09:05

I am trying to get dock click event on dock icon on Mac OS X. I am using Qt-Cocoa. Any help would be highly appreciated.

Thanks, Rahul

3条回答
  •  粉色の甜心
    2021-01-24 09:56

    In Qt-Carbon, see Qt4 Mac Dock Icon Click. It explains how to install a reopen event handler.

    In Qt-Cocoa, you should get the application delegate with [[NSApplication sharedApplicaion] delegate] and add you own applicationShouldHandleReopen:hasVisibleWindows: method with class_addMethod. I have not actually tried this.

提交回复
热议问题