首页 文章

桌面上的Qt MouseEvent模拟

提问于
浏览
0

我正在通过网络获取 MouseEvent 并通过 postEvent 解雇它们但是没有工作

QApplication::postEvent(DG::Util::_desktopWidget, ev);

DG :: Util :: _ desktopWidget正在 _init 初始化

QDesktopWidget* desktopWidget = new QDesktopWidget;//desktopWidget  is local
DG::Util::_desktopWidget = desktopWidget->screen(desktopWidget->primaryScreen());

1 回答

  • 0

    您是否检查过您从网络收到的事件( ev )是否有效?

    无论如何,请尝试使用 QApplication::sendEvent .

相关问题