Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] How to create QKeyEvent manually from (WM_KEYDOWN, wParam, lParam)
Forum Updated to NodeBB v4.3 + New Features

[Solved] How to create QKeyEvent manually from (WM_KEYDOWN, wParam, lParam)

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Z Offline
    Z Offline
    zlxwd
    wrote on last edited by
    #1

    I use QWebView to render webpages, and use the generated image in a D3D based program. I need to support basic mouse and keyboard operations on the webpages and get the updated image from QWebView.

    After checking the API, mouse operation is supported now, but I have no idea how to convert (WM_KEYDOWN, wParam, lParam) to QKeyEvent.

    Is there anything instructions / solutions on the convertion?

    PS: The programe is D3D based, so I cannot simply create a QWebView and show it as a Widget.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MuldeR
      wrote on last edited by
      #2

      [quote]*void QCoreApplication::postEvent ( QObject *receiver, QEvent event)
      Adds the event event, with the object receiver as the receiver of the event, to an event queue and returns immediately.[/quote]

      And the QKeyEvent object you will probably have to create+initialize yourself...

      My OpenSource software at: http://muldersoft.com/

      Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

      Go visit the coop: http://youtu.be/Jay...

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved