Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. How to capture HTML document mouse events?
Forum Updated to NodeBB v4.3 + New Features

How to capture HTML document mouse events?

Scheduled Pinned Locked Moved Qt WebKit
3 Posts 2 Posters 3.6k 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.
  • V Offline
    V Offline
    VladLvov
    wrote on last edited by
    #1

    Hello, I am new to QT and Qt WebKit. I am trying to port my .Net application that use MS WebBrowser control to QT. With MS WebBrowser component I was able to subscribe to HTML document mouse events but I cannot find similar functionality in the QT WebKit.
    Could you point me to a sample that handles mouse events using Qt WebKit?
    Thank you,
    Vladimir

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dangelog
      wrote on last edited by
      #2

      I don't think you can in an easy way -- you should install (f.i. via jQuery or similar) javascript functions for the events you're interested into, then make those functions call slots of some QObject object you register inside the page. See also

      • QWebFrame::addToJavaScriptWindowObject
      • http://doc.qt.nokia.com/4.7/qtwebkit-bridge.html

      Software Engineer
      KDAB (UK) Ltd., a KDAB Group company

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VladLvov
        wrote on last edited by
        #3

        Thank you for your prompt respond. That is exactly what I need.

        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