Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. QWebEngine can't load localhost on Windows
Qt 6.11 is out! See what's new in the release blog

QWebEngine can't load localhost on Windows

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 1.0k 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.
  • GGAllinG Offline
    GGAllinG Offline
    GGAllin
    wrote on last edited by
    #1

    Hello everyone!

    I'm porting old WebKit framework to the new QWebEngine
    I'm using Qt 5.6
    I need to load local webapps through localhost to bypass flash player security using QtcpServer.

    MainWindows start my tcp server with port 5052
    in My webEngineClass (webenginewidget.cpp) there is a method that open the webapp

    void WebEngineWidget::openDocument()
    {
        QString webAppUrl = ResourceManager().getWebappsDir("videoswf/index.html").absolutePath();
        QString indexUrl = "http://localhost:5082" + webAppUrl;
        QUrl index(indexUrl);
        qInfo() << "openVideoDocument" << index;
        view->load(index);
    }
    

    So on loadFinished i can call runjavascript to create my embed video swf
    This work very well on mac Osx
    output of qInfo:

    openVideoDocument QUrl("http://localhost:5082/Users/dev/build/webapps/videoswf/index.html")
    

    But in Windows
    qInfo() << "openVideoDocument" << index show

    qInfo() << "openVideoDocument" << QUrl("");
    

    Any Idea ??
    Thanks in advanced
    GG

    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