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. QtWebEngine : Load URL with HTTPPost
QtWS25 Last Chance

QtWebEngine : Load URL with HTTPPost

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 329 Views
  • 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.
  • S Offline
    S Offline
    subzero255
    wrote on last edited by
    #1

    I'm porting an internal browser from QtWebKit to QtWebEngine.

    I want a function to request url while posting some data.
    With WebKit, I could use the following:

    With class WebView derived from QtWebView :

    void WebView::loadPostUrl(const QUrl &url, QByteArray postdata)
    {
    	m_initialUrl = url;
    	QNetworkRequest request = QNetworkRequest(url);
    	request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
    	load(request, QNetworkAccessManager::PostOperation, postdata);
    }
    

    Since QtWebEngine does interact with QNetworkAccessManager how can we have the same functionalities with QtWebEngine ?

    Thanks

    1 Reply Last reply
    1

    • Login

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