0
我得到MouseEvent
在網絡和解僱他們通過postEvent
但不工作的Qt的MouseEvent仿真桌面
QApplication::postEvent(DG::Util::_desktopWidget, ev);
DG ::的Util :: _ desktopWidget在_init
QDesktopWidget* desktopWidget = new QDesktopWidget;//desktopWidget is local
DG::Util::_desktopWidget = desktopWidget->screen(desktopWidget->primaryScreen());
我沒有使用過QDesktopWidget,也不知道它是否可以用這種方式使用。但是,您是否檢查過QDesktopWidget是否獲得該事件?你是否檢查QDesktopWidget是否有任何孩子? – Bart 2011-05-20 07:47:40
'DG :: Util :: _ desktopWidget'類型爲'QWidget *',我如何檢查Wheather它是否獲得了mouseevent? – 2011-05-20 08:31:21