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] QWebView signals - calling C++ code from a webPage

[SOLVED] QWebView signals - calling C++ code from a webPage

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.7k 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.
  • M Offline
    M Offline
    maximus
    wrote on last edited by
    #1

    Hi,

    My Qt app is using a few QWebView to display content, as it was easier for me to design web Gui than Qt Gui (using popular framework : bootstrap, font-awesome, css3, etc..)
    Current example : https://www.dropbox.com/s/g91kj9t9bs2tn3v/WebViewInterface.png

    I would like to listen to a few event from the QWebView, for example, a button press inside a webPage that would call some C++ code.

    Is this possible? I'm thinking maybe use the "urlChanged(const QUrl & url)" Signal from the QWebView that would call some code, and make the button redirect to a specific action URL. This feel a bit hacky, would it be possible to listen to a specific button press inside a QwebView using another method? Thanks and feel free to comment, I don't know if mixing web content with Qt is a good idea but so far I like the result. I would have done the whole app on the web but I need to execute C++ code at some point :)


    Free Indoor Cycling Software - https://maximumtrainer.com

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

      Good ressource here:
      https://qt-project.org/wiki/Category:Developing_with_Qt::QtWebKit

      http://qt-project.org/doc/qt-4.8/qtwebkit-bridge.html

      QT ROCKS!


      Free Indoor Cycling Software - https://maximumtrainer.com

      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