Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Need help with QDeclarativeNetworkAccessManagerFactory
Qt 6.11 is out! See what's new in the release blog

Need help with QDeclarativeNetworkAccessManagerFactory

Scheduled Pinned Locked Moved QML and Qt Quick
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.
  • T Offline
    T Offline
    TonyR
    wrote on last edited by
    #1

    I have app with declarative view. On declarative side i use WorkerScript and XMLHttpRequest to get news from server. All good but some users use this app in environment where there is transparen proxy wtih authorisation. Ok, I wrote QDeclarativeNetworkAccessManagerFactory for creating QNetworkAccessManager wtih proxy settings. Because QDeclarativeNetworkAccessManagerFactory is not child of QObject I wrote special class to ba able to handle signal proxyAuthenticationRequired. I want in the slot show modal dialog where user can enter user name and password for proxy.

    Slot code
    @void NetworkAccessManagerCreator::onProxyAuthenticationRequired(QNetworkProxy proxy, QAuthenticator *authenticator )
    {
    WidgetSettings settings;

    ProxyDialog dlg;
    dlg.setProxyUrl(proxy.hostName() );
    
     if( dlg.exec() == QDialog::Accepted )
    {
        authenticator->setUser(settings.proxyUser());
        authenticator->setPassword(settings.proxyPassword());
    }
    

    }@

    When creates an instance of of dialogue, I get an error "Microsoft Visual C++ Runtime Library
    Runtime Error! This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information."

    I'm guessing that the error in the call to dialogue in another thread, but I do not understand how to fix it
    May be some one have any ideas

    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