How can i access to WebViewLoadRequest in C++?



  • Dear Guys
    I want to connect Quick Controls 2 WebView WebViewLoadRequest signal in C++ Slot.
    In this signal we have one argument with type of WebViewLoadRequest . So, how can i define this type in C++ slot as input?

    void MyClass::OnUrlChanged(const ???? &)

    thanks


  • Moderators

    @Advanced I doubt it could be possible to access WebViewLoadRequest in C++ as there is no public API for it.
    As far as urlChanged is concerned it returns a QUrl so that should be possible as usual. QUrl will be the parameter.



  • @Advanced, Hi

    You need QQuickWebViewLoadRequest from QtWebView/private/qquickwebviewloadrequest_p.h.
    This type is registred in qtwebview/src/imports/webview.cpp.

    If I'm not mistaken it should be at webview-private.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.